Guest_imported
New member
- Jan 1, 1970
- 0
select * from dic limit 0,30
In a database with millions of records this query takes
minutes to finish when I only need the first 30 records
from the table.
It seems the LIMIT clause limits only results sent to the client.
MySQL selects ALL records matching the search criteria and
sends to the client only the records specified in the LIMIT clause.
The MySQL documentation says the LIMIT stops the search
after it finds the specified numer of records.
A bug in MySQL?