I see the same number of queries as Robert
>> First about MultipleJoin: as Robert wrote in
>> person.addresses will generate n+1 queries to DB.
> I don"t think that is what happens...? It"s
certainly not intended to
> cause that many selects.
Unfortunately, it does, at least it does when using
Postgres, a fresh install of
SQLObject 0.6, Python 2.3.3, W2000 :-(
The first select is :
SELECT id FROM address WHERE person_id = ###
which returns "n" id"s
then for every id in the returned list there is :
SELECT column(s)... FROM address WHERE id = ####
i.e. n+1 queries to DB.
Log in to post a comment.