Hi,
I've populated a table with 100.000 records of data and a single query to select a record based on two parameters (indexed fields) take up to 2 seconds on my office machine. Is this normal?
Customers need to be searched for type and flag and then sorted by lastvisit and limited by 10. It doesn't matter what is the limit, one search takes around 2 seconds. Is there something obvious I'm doing wrong?
Code MySQL:CREATE TABLE `customers` ( `id` int(11) NOT NULL auto_increment, `customernumber` varchar(13) default NULL, `name` char(255) default NULL, `address` char(255) default NULL, `telephone` char(128) default NULL, `type` char(255) default NULL, `notify` tinyint(4) default NULL, `productsviewed` int(11) default NULL, `flag` char(1) default NULL, `purchases` char(4) default NULL, `lastvisit` bigint(20) default NULL, PRIMARY KEY (`id`), KEY `lastvisit` (`lastvisit`), KEY `type` (`type`), KEY `flag` (`flag`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=102509








Bookmarks