#7760: Queries on large primary tables with limit/offset clauses are slow
---------------------------------------------+------------------------------
          Reporter:  henrybaxter             |         Owner:  nobody           
        
            Status:  new                     |     Milestone:                   
        
         Component:  Uncategorized           |       Version:  SVN              
        
        Resolution:                          |      Keywords:  
database,admin,slow,query
             Stage:  Design decision needed  |     Has_patch:  1                
        
        Needs_docs:  0                       |   Needs_tests:  0                
        
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by henrybaxter):

 Thank you for looking at it, I really appreciate it. I actually think I
 agree though, it's just not that useful. It requires careful manipulation
 for ORDER BY as well as WHERE as I mentioned.

 Sorry for the ill-conceived idea :)

 By the way the 'use case' was the Django admin. I still think somehow
 Django admin should handle this situation better:

 class Thing(models.Model):
     me = models.CharField(max_length=100)
     foreign = models.ForeignKey(Foreign)
     foreign2 = models.ForeignKey(Foreign2)

     class Admin:
         list_display = ('me', 'foreign', 'foreign2')

 where 'Thing' has > 10000 entries, foreign tables need not be too large
 and you are looking at the admin changelist for it

 On a decent machine with no load the resulting query will take several
 seconds to process

 In face I have no idea why MySQL does not optimize the query, since this
 is really the database's territory...

 Thanks again for your response!

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7760#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to