0

I have more than 420,000 rows articles in my table. I just want to query a data which is has only one row, but it takes too long.. any suggestion?

database : mysql, Storage engine : MyISAM

mysql_query("SELECT id, title, ... ,postdate FROM table_name WHERE id = 1

the result only one row.. but it take too long to open the page that query on more than 420,000 rows table

Edited by happygeek: fixed formatting

3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by mwasif
1

Post the output of

EXPLAIN SELECT id, title, ... ,postdate FROM table_name WHERE id = 1
0

Post the output of

EXPLAIN SELECT id, title, ... ,postdate FROM table_name WHERE id = 1

Everything is work, the output work good. But the problem is it take a long time to open the page.

This is the same problem when i work with 1,000,000 rows. it take a long long time to open the page. Is there any explanation about this? do i need to use a cache in the query?

0

Post the output of EXPLAIN so that I can identify the problem. Also post the table structure preferably the out put of

SHOW CREATE TABLE table_name;
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.