Select from derived table freezes phpmyadmin

219 Views Asked by At

I have a table Doctor, which has 30 000 records. I was wondering, why does this simple SQL query:

SELECT * FROM ( SELECT * FROM Doctor ) AS tmp

take at least 5 minutes to execute in phpmyadmin (it is killed after 5 minutes of executing by default, but 5 minutes for this kind of query is way too long too)

However, if I do it with database City, which has roughly 3000 records, it takes about 3 minutes to load, but phpmyadmin said the query took 0.001 seconds..

I know these queries don't make sense and they can be simplified, but I needed to select from more complex derived table and found out that not even this simple query works.

Any ideas?

Thanks

0

There are 0 best solutions below