On Jan 18, 2007, at 2:11 PM, James Bennett wrote:

On 1/18/07, Joseph Heck <[EMAIL PROTECTED]> wrote:
I believe that doing [1:3] and [3:10] separately will result in two database queries - it evaluates on the the slice. If you wanted to curl that into one call, then it would be up to you to do your original slice as [1:10] and
then pull out the pieces for your internal loops as needed.

IIRC slicing doesn't automatically generate a query unless the slice
specifies a step (e.g., [1:10:2]), because all that's needed to
support non-stepped slices is to add limit and offset to the eventual
query.

So Django would combine [1:3] and [3:10] into one database hit?

AFAIK, you can do those two in just sql -- Django would need to know to slice the resulting [1:10] set automatically.

---
David Zhou
[EMAIL PROTECTED]




--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to