> so, to get all the postings for a state I have to do the following:
>
> 1. search for schools in that state
> 2. search for grades in that school
> 3. search for users within that grade
> 4. and finally, get all the postings for that user
>
> seems a little complicated.

Actually, this is what RDBMS's are good for.

Django's Querysets should have no problems pulling user postings like
this by traversing through all your tables (using appropriate SQL
JOINs).

If you have already tried this and are having performance issues,
consider adding INDEXES on fields that were used in the Queryset
composition.

You can do this in your models using db_index=True on relevant fields
of each model. For example, add an index on the state field of School,
school field of Grade, and so on (assuming School, Grade are your
models/tables).


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to