>From performance stand point, I read that avoiding function definition in
models files improve a lot...

So, considering that you may already had reach the optimization provide by
lazy_table, you may have look and make sure you didn't have defined
function or class in web2py models files somewhere...

Richard

On Thu, Feb 5, 2015 at 9:11 PM, Richard Vézina <ml.richard.vez...@gmail.com>
wrote:

> Jim,
>
> As far as I can see and from which I know about lazy_table you already
> lazy_table compliant...
>
> What have been said about it application or not once flag is set to true
> was that you must not define your validator outside model definition (you
> actually do that in your example)...
>
> You can't do :
>
> db.define_table('productSequenceTag',
>                                      Field('productSequenceTagId', 'id',
>  readable=False),
>                                      Field('productId', db.product, label=
> 'ProductId'),
>                                      Field('sequenceTagId', db.sequenceTag
> , label='Sequence Tag', ondelete='RESTRICT'),
>                                      plural='Seq Tags')
>
> db.productSequenceTag.productId.requires = IS_IN_DB(db, 'product.id', 
> '%(productNumber)s
> - %(productName)s',
>                                                              zero='..')
>
>
> But you don't do that actually...
>
> Richard
>
> On Thu, Feb 5, 2015 at 6:04 PM, Jim S <j...@qlf.com> wrote:
>
>> Hi
>>
>> I need to take advantage of the performance boost available using
>> lazy_table=True.
>>
>> My problem is that I have lots of table definitions in db.py that look
>> like this:
>>
>> productSequenceTag = db.define_table('productSequenceTag',
>>                                      Field('productSequenceTagId', 'id',
>> readable=False),
>>                                      Field('productId', db.product, label
>> ='ProductId',
>>                                            requires=IS_IN_DB(db, '
>> product.id', '%(productNumber)s - %(productName)s',
>>                                                              zero='..')),
>>                                      Field('sequenceTagId', db.
>> sequenceTag, label='Sequence Tag', ondelete='RESTRICT'),
>>                                      plural='Seq Tags')
>>
>>
>> There isn't much on the subject in the book, but there are a number of
>> good threads here in the group.  However, it is really hard (for me at
>> least) to sift through all this info and know definitively what is the best
>> way to define a table and make sure it is lazy.
>>
>> Has anyone successfully implemented lazy_tables on a large db project?
>> I've got 155 tables in my application.
>>
>> I really need to find a way to make this load quicker.  Any help would
>> really be appreciated.
>>
>> -Jim
>>
>> --
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to