RE: query unexpectedly took too long.

2005-08-01 Thread Jason Pyeron
On Mon, 1 Aug 2005, Jay Blanchard wrote: CREATE TABLE bvolset ( id int(11) NOT NULL auto_increment, bdate datetime default NULL, level int(11) NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEY bdate (bdate), KEY level (level) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; [/snip] Pro

RE: query unexpectedly took too long.

2005-08-01 Thread Jay Blanchard
[snip] > Proper indexing will solve your problem. Index bdate and level, that > should speed things up considerably. > >From the looks of things, bdate and level are *already* indexed. Or, did you want him to create a multi-column index on bdate and level? You weren't very clear in your suggestio

RE: query unexpectedly took too long.

2005-08-01 Thread SGreen
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 08/01/2005 09:20:59 AM: > [snip] > I have this query which gets executed often, but when I saw this today I > > panicked. Any suggestions to why this took so long? > > mysql> SELECT t2.id, t2.bdate, t2.level FROM bvolset AS t1 JOIN bvolset > AS > t2

Re: query unexpectedly took too long.

2005-08-01 Thread SGreen
[EMAIL PROTECTED] wrote on 08/01/2005 09:13:46 AM: > I have this query which gets executed often, but when I saw this today I > panicked. Any suggestions to why this took so long? > > mysql> SELECT t2.id, t2.bdate, t2.level FROM bvolset AS t1 JOIN bvolset AS > t2 ON t2.bdate bdate DESC LIMIT

RE: query unexpectedly took too long.

2005-08-01 Thread Jay Blanchard
[snip] I have this query which gets executed often, but when I saw this today I panicked. Any suggestions to why this took so long? mysql> SELECT t2.id, t2.bdate, t2.level FROM bvolset AS t1 JOIN bvolset AS t2 ON t2.bdatehttp://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMA