It doesn't look like you are using an index. Have you tried creating one
and seeing what the effect on execution time is?
--Russell
----- Original Message -----
From: "Philip Brown" <phil@stripped>
To: "Russell Miller" <duskglow2000@stripped>; <mysql@stripped>
Sent: Friday, October 05, 2001 1:34 PM
Subject: RE: Bizarre query performance
> > Have you tried "explain"ing the two select to see where all the time is
> > being spent and how the queries are optimized?
>
> Sorry, I should have included that in my detail.
>
>
+-------+-------+---------------+---------+---------+-------+------+-------+
> | table | type | possible_keys | key | key_len | ref | rows | Extra
|
>
+-------+-------+---------------+---------+---------+-------+------+-------+
> | X | const | PRIMARY,p1 | PRIMARY | 4 | const | 1 |
|
>
+-------+-------+---------------+---------+---------+-------+------+-------+
>
> This is the query that takes 200ms. It performs the same regardless of the
> particular table involved (all have a similar primary key), or the record
> fetched.
>
>
+------+-------+----------------+----------------+---------+------+------+--
> ----------+
> | table| type | possible_keys | key | key_len | ref | rows |
> Extra |
>
+------+-------+----------------+----------------+---------+------+------+--
> ----------+
> | X | range | ScheduledStart | ScheduledStart | 8 | NULL | 25 |
> where used |
>
+------+-------+----------------+----------------+---------+------+------+--
> ----------+
>
> This is the query that takes less than 10ms. Performance should be worse
> than that
> above, but it is not.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com