I am sending few value to ajax page and getting filtered by that parameter. for one parameter if the data results is greater than 1500(lets assume) its not giving me any result .else its giving. same query when i am executing manually in phpmyadmin its executing and taking .1010 sec time for the result what is greater than 1500 is only not coming else coming.
when i am giving certain range like limit 1000 ,then 1000 data is coming.but the result set have 2000 data how all will come
SELECT mud.*
FROM corporate_user_mapping cum
LEFT OUTER JOIN master_user_details mud on mud.id=cum.r_user_id
LEFT OUTER JOIN doctype pincode ON pincode.id=mud.pincode
LEFT OUTER JOIN doctype area ON area.id=pincode.parent_id
LEFT OUTER JOIN doctype city ON city.id=area.parent_id
LEFT OUTER JOIN doctype state ON state.id=city.parent_id
LEFT OUTER JOIN doctype country ON country.id=state.parent_id
WHERE cum.location='$sessionlocation_id' AND cum.isactive='1' and emp_type='2'
GROUP BY mud.id
ORDER BY mud.first_name
You could use an offset for sequential queries, so fetch 1000 rows, next round start at 1001 and take the next 1000 rows.
... LIMIT 1000 OFFSET 1000... ;