mardi 15 mars 2016

rails query Timeout::Error: execution expired

I have one simple query, but its showing the Timeout::Error: execution expired, also i am using rack::timeout

SELECT  SUM(total_checks) as totalcheck FROM "orders"  WHERE 
(orders.order_status_id NOT IN (15, 17)) AND (orders.check_id = 36) AND 
(orders.pass_id = '49') AND (orders.created_at BETWEEN '2016-02-29 
22:00:00.000000' AND '2016-03-02 22:00:00.000000') LIMIT 1

also, i have total orders around 9762797, is there any issue with this query?

Aucun commentaire:

Enregistrer un commentaire