Multi-column Index

51 views
Skip to first unread message

Patrick Lin

unread,
Apr 23, 2007, 10:14:48 PM4/23/07
to django...@googlegroups.com

Hi all,

   I would like to leverage the mysql multiple-column index to speed up the query performance.  I thought the “unique-together” might do the trick, but it’s not.  Do anybody have a model example which could create multiple-column index?  Thanks for the help!

 

-Patrick

Malcolm Tredinnick

unread,
Apr 24, 2007, 12:33:33 AM4/24/07
to django...@googlegroups.com

Django doesn't create multi-column indexes (as you can see from looking
in django/core/management.py). You will have to create these manually,
which you could do using initial SQL files (see [1]) or by hand.

[1]
http://www.djangoproject.com/documentation/model-api/#database-backend-specific-sql-data

Regards,
Malcolm


Reply all
Reply to author
Forward
0 new messages