Re: Postgresql Index & expensive queries [n00bie alert]
On Oct 20, 2012, at 11:34 PM, Barry Morrison wrote:
> Looking further at Postgresql, what's interesting. Is it creates an 'id' column and appends '_id' to what is assumed to be the id field (if none is specified).
>
> Also, it appears the magic may have already created the indexes:
It's not actually PostgreSQL that's creating those. That's Django's standard behavior.
1. It automatically creates an id column for any model that lacks an explicit primary key.
2. It automatically adds an index to foreign key models (for text fields, you get both the standard one and the varchar_pattern_ops one, which is technically no longer required).
--
-- Christophe Pettus
xof@thebuild.com
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home