I have the following table:
CREATE TABLE history (
id int(10) unsigned NOT NULL auto_increment,
time_sec int(10) unsigned NOT NULL default '0',
account_id int(10) unsigned NOT NULL default '0',
PRIMARY KEY (id),
KEY account_id (account_id),
KEY time_sec (time_sec),
) TYPE=MyISAM
OK, after reading http://dev.mysql.com/doc/refman/5.0/en/order-by-
optimization.html I have learned improved the speed somewhat by
creating a multi-column index on account_id and time_sec, such that:
--
SELECT
René Fournier [EMAIL PROTECTED] wrote on 11/17/2005 04:19:25 PM:
OK, after reading http://dev.mysql.com/doc/refman/5.0/en/order-by-
optimization.html I have learned improved the speed somewhat by
creating a multi-column index on account_id and time_sec, such that:
On 17-Nov-05, at 2:41 PM, [EMAIL PROTECTED] wrote:
René Fournier [EMAIL PROTECTED] wrote on 11/17/2005 04:19:25 PM:
OK, after reading http://dev.mysql.com/doc/refman/5.0/en/order-by-
optimization.html I have learned improved the speed somewhat by
creating a multi-column index on account_id