Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hasaftab's avatar

Query takes too much time in loading

i made a query for random product my query Looks like

SELECT * FROM product AS a ORDER BY RAND(CURDATE() + INTERVAL (SELECT MINUTE(NOW())) MINUTE - INTERVAL 1 MINUTE) LIMIT 15

issue is i have 150K data in my product table the query takes woo much time to load maximum 9 second What should i do for fast loading Please Help

0 likes
2 replies
primordial's avatar

Have you tried "describing" the query to find out where is it falling short?

Please or to participate in this conversation.