I've got an SQLFORM.factory inside a model. Very standard stuff:

form = SQLFORM.factory(db.mytable, record=db.mytable[myindex])

The problem is, as I insert users into db.auth_user, the above 
SQLFORM.factory statement takes longer and longer to execute. It begins by 
executing in 0.05 seconds when there are only 3 rows in db.auth_user. 
However, when db.auth_user grows to 10,000 rows, it takes 11.4 seconds to 
do the above assignment. At 100,000 rows it takes over 2 minutes.

Any ideas where the trouble is? The db.mytable does have a user_id field 
that references auth_user:

    Field('user_id', db.auth_user,
        requires=IS_NULL_OR(IS_IN_DB(db, 'auth_user.id')),
        ),

but I don't see how this could affect anything. This is a showstopper for 
me, so any help would be appreciated. Thanks.

-- 



Reply via email to