How can I force with PHP a SQL query, to skip reading 60.000 rows! I need to select just 10 first rows and it takes lifetime!
$FirstRowsQuery = "SELECT * FROM `tbl_premium_articles` ORDER BY `id_p` DESC LIMIT 10";
Is there any way to bring it query in one second?
For this query:
SELECT pa.*
FROM `tbl_premium_articles` pa
ORDER BY pa.id_p DESC
LIMIT 10;
You want an index on tbl_premium_articles(id_p)
.