different between limit query in mysql and php -


this question has answer here:

i'm trying make page number table , need know row count.

for example query select * tbl , result 100rows.

i should limit query 10rows 1 page.

if cant rows count.

i want know there different between limit mysql our php in process speed.

please tell me if have idea.

you shoud use limit in mysql. why?

*because take less time fetch amount of data , transmit instead of getting everything.  *because consume less memory.  *because working smaller arrays faster. 

as me, used php filter when not perform filtering in mysql

just update answer, joachim isaksson posted:

sql_calc_found_rows count rows, can perform correct pagination.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -