django-batch-select 0.2.4

Batch select many-to-many and one-to-many fields (to help avoid n+1 query problem)

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
BSD License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
John Montgomery
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
django-batch-select was created to provide an equivalent to Django's select_related_ functionality. As of such it's another handy tool for avoiding the "n+1 query problem".

select_related_ is handy for minimizing the number of queries that need to be made in certain situations. However it is only usual for pre-selecting ForeignKey_ relations.

batch_select is handy for pre-selecting ManyToManyField_ relations and reverse ForeignKey_ relations.

It works by performing a single extra SQL query after a QuerySet_ has been evaluated to stitch in the the extra fields asked for. This requires the addition of a custom Manager_, which in turn returns a custom QuerySet_ with extra methods attached.

Last updated on November 22nd, 2011

requirements

#batch select #n+1 query #Django #batch #select #query

Add your review!

SUBMIT