[snip]
From: "Jay Blanchard" <[EMAIL PROTECTED]>
> So if I index a date field (given yyyy-mm-dd) and then
>
> SELECT `userNames`
> FROM `userTable`
> WHERE SUBSTRING(`userBirthDate`, 6, 5) = SUBSTRING(NOW(), 6, 5)
>
> it is still very fast. I have a table with several thousand records in
> it and I get back ...
>
> 30 rows in set (0.00 sec)

on my test machine this variation takes approx. 0.18 seconds...

Have you tried:

SELECT SQL_NO_CACHE `userNames`
FROM `userTable`
WHERE SUBSTRING(`userBirthDate`, 6, 5) = SUBSTRING(NOW(), 6, 5)

To prevent the use of the query cache? Otherwise you will get very fast
results, just because the query is not executed at all, but the result
is
returned from the cache...
[/snip]

That first result was a non-cached query on a dual processor server.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to