I have a floating problem on
mysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (i686) using readline 6.1
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
one result like this
mysql> SELECT `offers`.* FROM `offers` WHERE (created_at > '2011-12-12 07:00:00') ORDER BY updated_at DESC LIMIT 15 OFFSET 0
-> ;
Empty set (44.00 sec)
100 results like this
mysql> SELECT `offers`.* FROM `offers` WHERE (created_at > '2011-12-12 07:00:00') ORDER BY updated_at DESC LIMIT 15 OFFSET 0;
Empty set (0.00 sec)
seems like no one except me can get access to database and lock table
i can`t understand whats going on
same trouble on development AMD Athlon X4 with 4GM DDR3 on development
and on Linode 512 plan Ubuntu 10.4
is there anyone have ideas?
There is no floating problem in this given scenario,
chances are
offerstable is huge,and you did not have an index on column created_at
MySQL need to perform full table scan to determine how many matches (even if empty).
After first execution, the result is stored into mysql query cache (memory),
it will used for subsequent same query if there is no data updated since the first query.
It explained why the second query take zero seconds.
Usually, when you have doubts,
do this :-
It will explain how mysql do the query optimization