[web2py] Re: mysql db connections

2013-05-29 Thread Derek
I only suggest that because usually making a connection takes next to no time at all. I've written my apps different ways - one way opening a connection and keeping it open and the other way, opening the connection and closing it on each query. It makes no difference really as far as speed is c

[web2py] Re: mysql db connections

2013-05-29 Thread Derek
Have you tried to enable caching? On Sunday, May 26, 2013 1:07:53 PM UTC-7, Saba wrote: > > Thanks for the reply. I really appreciate. I'm developing an app using > web2py to pull up records from mysql db and present it to the user using > custom views. It looks like sometimes it takes < 1sec to

[web2py] Re: mysql db connections

2013-05-29 Thread Saba
Any suggestions pls? On Sunday, May 26, 2013 1:07:53 PM UTC-7, Saba wrote: > Thanks for the reply. I really appreciate. I'm developing an app using > web2py to pull up records from mysql db and present it to the user using > custom views. It looks like sometimes it takes < 1sec to display the

[web2py] Re: mysql db connections

2013-05-26 Thread Saba
Thanks for the reply. I really appreciate. I'm developing an app using web2py to pull up records from mysql db and present it to the user using custom views. It looks like sometimes it takes < 1sec to display the records to the user (i'm the only user now) but other times it takes around 4-5sec

[web2py] Re: mysql db connections

2013-05-26 Thread Massimo Di Pierro
On Sunday, 26 May 2013 01:34:40 UTC-5, Saba wrote: > > > Hi, > > I have a question please regarding db connections and connection pooling > in web2py. > > In models/db.py, I have a connect string like this: > > db=DAL('mysql...',pool_size=5) > > does model files get executed for every

[web2py] Re: mysql db connections

2013-05-26 Thread Niphlod
nope. DAL retains a connection pool, opening at most pool_size connections. For threaded webservers, this means that every connection instantiate a new connection until pool_size is reached. Connections are then recycled (as opposed to trashed) for every new incoming request. For multiprocess we