Re: DB optimization docs

2010-01-17 Thread Russell Keith-Magee
On Mon, Jan 18, 2010 at 2:03 AM, Mat Clayton wrote: > Thrown together a first attempt at adding multi column indexes and just want > some comments on the syntax used, for example. > from django.db import models > class Poll(models.Model): >     question =

Re: DB optimization docs

2010-01-17 Thread Mat Clayton
Thrown together a first attempt at adding multi column indexes and just want some comments on the syntax used, for example. from django.db import models class Poll(models.Model): question = models.CharField(max_length=200, db_index=True) pub_date = models.DateTimeField('date published')

Re: DB optimization docs

2010-01-16 Thread Russell Keith-Magee
On Sat, Jan 16, 2010 at 9:55 PM, Mat Clayton wrote: > Thanks, I've looked over both sets of code, seem's fine to me. The only > complex stuff is that Indexes can only be created on certain field types, so > additional checks may need doing. Also different index types are

Re: DB optimization docs

2010-01-16 Thread Mat Clayton
Thanks, I've looked over both sets of code, seem's fine to me. The only complex stuff is that Indexes can only be created on certain field types, so additional checks may need doing. Also different index types are available on different storage engines, for MySQL. Would people want support for

Re: DB optimization docs

2010-01-16 Thread Russell Keith-Magee
On Sat, Jan 16, 2010 at 8:56 PM, Mat Clayton wrote: > 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. In the end,

Re: DB optimization docs

2010-01-16 Thread Mat Clayton
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

Re: DB optimization docs

2010-01-16 Thread Russell Keith-Magee
On Sat, Jan 16, 2010 at 7:52 PM, Mat Clayton 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

Re: DB optimization docs

2010-01-16 Thread Mat Clayton
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

Re: DB optimization docs

2010-01-15 Thread Luke Plant
I've added these docs now, or at least a good first stab at them. Suggestions for improvements are welcome, patches are more welcome, as always :-) I backported to 1.1.X, and tried to remove any anachronisms. Regards, Luke -- "Outside of a dog, a book is a man's best friend... inside of a

Re: DB optimization docs

2010-01-08 Thread Christopher Petrilli
Luke, I wonder if it's the right place, but one thing I have noticed most people don't realize is that they need to run something to do pooling between Django and the DB. I run pgpool, even when there is only one of each since it does the connection pooling for you. This can be a HUGE win in many

Re: DB optimization docs

2010-01-08 Thread Luke Plant
On Friday 08 January 2010 14:12:56 Mat Clayton wrote: > As someone going through this pain right now, this would be very > helpful. > > Mat I don't know when I'll have more time to work on this, but I've committed the beginnings of draft of docs/topics/db/optimization.txt to my hg repos.

Re: DB optimization docs

2010-01-08 Thread Russell Keith-Magee
On Fri, Jan 8, 2010 at 10:04 PM, Luke Plant wrote: > Hi all, > > I was prompted by this post: > > http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from- > django-36278 > > to add some notes about some DB access optimizations (essentially the > things I

Re: DB optimization docs

2010-01-08 Thread Mat Clayton
As someone going through this pain right now, this would be very helpful. Mat On Fri, Jan 8, 2010 at 2:04 PM, Luke Plant wrote: > Hi all, > > I was prompted by this post: > > http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from- >

DB optimization docs

2010-01-08 Thread Luke Plant
Hi all, I was prompted by this post: http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from- django-36278 to add some notes about some DB access optimizations (essentially the things I mentioned in my comment on that page), but then thought that even if I add them, people are