Great, have to confess I don't know the ORM internals at all, so not sure how long this could take me, shall see what I can do. Also any indications of where/what to start looking for would be appreciated.
'db_index_together' seems fair enough, will be trivial to change later anyway. With respect to db support I assume all backend's need support in any patch? Mat On Sat, Jan 16, 2010 at 12:27 PM, Russell Keith-Magee < [email protected]> wrote: > On Sat, Jan 16, 2010 at 7:52 PM, Mat Clayton <[email protected]> wrote: > > I know this isn't really related, but figure I would bring it up here. > When > > working on optimizing our django app, it became very clear that one of > the > > biggest issues as usual is Indexes, particularly multi column indexes, > which > > at present django doesnt appear to support. > > I know ticket 373 http://code.djangoproject.com/ticket/373 covers multi > > column primary keys, but are there any intentions to cover multi column > > indexes as a smaller issue prior to this. The reason I bring this up, is > > after checking the mysql logs we discovered our most costly queries are > > actually due to django comments and the lack of multicolumn indexes, > after > > adding the correct index query times went from 300mS to <10mS giving us a > > nice speed boost. > > If this is likely to be a nice addition to django, we would be willing to > > commit some resources to trying to get it into core, any thoughts on > this? > > Sounds like a reasonable suggestion to me. I've had similar thoughts > over the last couple of weeks as I've been tuning the performance of > the database at work. > > > Or does anyone else have a need for it? Or would we be standing on the > toes > > of the 373 ticket? > > I don't think it stands on the toes of #373 either. #373 will probably > imply the need for multi-column indexes, but that doesn't remove the > broader need for multi-column indexes. > > > I was thinking of cloning the unique_together style and adding an > > index_together Meta option, thoughts? > > A Meta option sounds like the right way to define it. Getting out my > bikeshed-painting brush, I'd probably call the Meta option > 'db_index_together', so as to maintain the parity between > 'unique->unique_together' and 'db_index->db_index_together'. > > We have about 10 days until the 1.2 beta freeze; if you can work up a > patch quickly, I can see about getting this in for 1.2. Any > suggestions on multi-column indexes that we should add to shipped > Django models are also welcome (i.e., the indexes that are needed for > comment models). > > Yours, > Russ Magee %-) > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<django-developers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > > > -- -- Matthew Clayton | Founder/CEO Wakari Limited twitter http://www.twitter.com/matclayton email [email protected] mobile +44 7872007851 skype matclayton--
You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en.
