Tuesday, March 29, 2011

Re: Slow query. Any way to speed things up?

On 29 mar, 12:26, Fabian Büchler <fabian.buech...@gmail.com> wrote:

(snip part about the generated query)

> As Javier suggested, an index on the "events_eventdate" over table over
> "event_id" and "date" could help, but I don't know how to create one using
> Django's model techniques

This is something you can do directly at the database level - and you
can add custom SQL statements to be run at syncdb time if necessary:

http://docs.djangoproject.com/en/dev/howto/initial-data/#providing-initial-sql-data

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment