Question

I work with mysql and I have a table containing millions of registration, I run a query directly in phpmyadmin, and I wait about 2 minuts to get the result but it shows me Processing 0.0005 sec, I do not know where the delay comes from, knowing that I only displays 30 lines per page. help me please if you have any proposition.

Was it helpful?

Solution 2

Maybe try something like:

SELECT * FROM comments c JOIN users u ON c.user_id = u.id_user_coms
JOIN posts p ON c.post_id=p.id
JOIN pages pa ON p.page_id=pa.id

WHERE c.text LIKE "%iphone%" 
AND pa.name LIKE "%iphone%"

OTHER TIPS

Show query please. Maybe it show you 30 lines per page, but other 1.000.000+ lines always in memory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top