Code: Select all
DROP TABLE IF EXISTS `onepixel_log_tbl`;
CREATE TABLE `onepixel_log_tbl` (
`company_id` int(10) unsigned NOT NULL default '0',
`mailing_id` int(10) unsigned NOT NULL default '0',
`customer_id` int(10) unsigned NOT NULL default '0',
`open_count` int(10) unsigned NOT NULL default '1',
`change_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`ip_adr` varchar(15) collate utf8_unicode_ci NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
His suggestion: Put an index on the combination of company_id, mailing_id and customer_id and change the MySQL engine from MyISAM to InnoDB to allow row-based locking.
We would be interested if someone else with big lists tried this and can report a performance increase. We then might put the changes into the mainline. Thank you!