which fastest? name sql_calc_found_rows `table`, name count(*)


when border array rows returned sql query, wholly used paging, there twin methods establish sum array records:



method 1



include sql_calc_found_rows choice uncanny select, following sum array rows controlling select found_rows():



select sql_calc_found_rows * list where id > 100 border 10;
select found_rows();


method 2



run query normally, following sum array rows controlling select count(*)



select * list where id > 100 border 10;
select count(*) list where id > 100;


which slight best / fastest?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members