Niphlod,
Thanks (belatedly) for your valuable  contribution and  your test results. 
 The only thing missing from your test is contention for database 
resources/connections and that is what prompted my initial question. In the 
past I worked on a client server application where we had performance 
issues re  getting and releasing database connections (this was against a 
heavily used clinical trials Oracle database). 

I'm very clear on the value of adding indexes to the database - however 
that is a bit tangential to my initial question - which was primarily 
focused on understanding the limitations/boundaries of using the DAL and 
connection management. 

I'm curious about your statement that the DAL will always use the same 
connection. My understanding is that the DAL closes and reopens the 
database connection for each request.  Whether it's the same connection or 
not may not matter -  once you close a db connection it goes back into the 
pool and you may/may not incur a delay in opening new connection. (In a 
lightly loaded system you may never see this issue however).

I was under the impression that minimizing db connections was desirable to 
prevent thrashing. In the real world this may no longer be an issue. I do 
however recall this being an issue in the past and it's something that is 
seldom mentioned in Web development. 

Finally, just so there is no confusion here - I'm not criticizing web2py or 
the DAL here - my question is equally valid for Rails, Django etc - afaik 
all these frameworks close and reopen connections for each request. 

Again thanks for your thoughtful response to my initial question. 

BrendanC


Reply via email to