#1615: Doctrine_Pager is highly inefficient
------------------------+---------------------------------------------------
  Reporter:  colnector  |       Owner:  guilhermeblanco      
      Type:  task       |      Status:  new                  
  Priority:  major      |   Milestone:  Unknown              
 Component:  Pager      |     Version:                       
Resolution:             |    Keywords:                       
  Has_test:  0          |    Mystatus:  Pending Core Response
 Has_patch:  0          |  
------------------------+---------------------------------------------------
Changes (by jwage):

  * version:  1.0.3 =>
  * milestone:  => Unknown

Old description:

> The pager sends 3 queries to the database whereas a single query or two
> would suffice. If these queries are simple, it's probably neglible. But
> when they're not, it's a BIG waste of time.
>
> Every pager query makes these 3 queries
> {{{
> # SELECT COUNT(DISTINCT z.id) ...
> # SELECT DISTINCT z4.id
> # SELECT ...
> }}}
>
> Whereas the first one (the counter) is needed only when the complete
> count is needed (sometimes we may want a partial pager without the
> complete count and simply a NEXT option).
>
> The second gets the ids of all relevant items. I couldn't understand what
> it's good for but I'm guessing it's something about the complicated LIMIT
> implementation in Doctrine. IMHO this is a big waste in most scenarios.
>
> The third one is getting all the relevant information.

New description:

 The pager sends 3 queries to the database whereas a single query or two
 would suffice. If these queries are simple, it's probably neglible. But
 when they're not, it's a BIG waste of time.

 Every pager query makes these 3 queries
 {{{
 # SELECT COUNT(DISTINCT z.id) ...
 # SELECT DISTINCT z4.id
 # SELECT ...
 }}}

 Whereas the first one (the counter) is needed only when the complete count
 is needed (sometimes we may want a partial pager without the complete
 count and simply a NEXT option).

 The second gets the ids of all relevant items. I couldn't understand what
 it's good for but I'm guessing it's something about the complicated LIMIT
 implementation in Doctrine. IMHO this is a big waste in most scenarios.

 The third one is getting all the relevant information.

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1615#comment:8>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to