db=SQLDB(....,pool_size=10)

will do connection pooling and connections will be reused

    db.define_table(....,migrate=False)

it will not attempt to create the table if you know it there and you
have not changed it.

It will be much faster.

Massimo

On Jun 25, 6:46 pm, kuba <kubano...@gmail.com> wrote:
> Hi guys,
>
> I am total newbie to web2py, and one thing really irritates me.
> As i noticed every time I refresh application in web browser db.py and
> any other file in models dir are executed. In tutorial it states that
> whole db initialization should be specified there and as I understand
> during this proces dafine_table functions connects with database to
> check if the table matches its definition....
>
> This means every time i refresh any page or go to another a connection
> with database is made.
>
> is it really is this way or am i missing something ?
>
> I hope i am wrong :)
>
> Thx for help
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to