> the number of calls itself is meaningless, i dont comprehend why
> people have a hard time understanding this simple fact.
>

The point for me is :

something like
select count(*) from user user1 inner join company com1 on user1.company_id=
com1.id where com1.code='dht2'  - called in size()
followed by
select firstName,lastName from user user1 inner join company com1 on
user1.company_id=com1.id where com1.code='dht2' limit 10 offset 20 - called
in iterator


is going to cost more than just:
select firstName,lastName from user user1 inner join company com1 on
user1.company_id=com1.id where com1.code='dht2' limit 10 offset 20
which is all that is needed

hence avoiding 2 calls where 1 will do.

Reply via email to