Not sure if I'm qualified to give tips here, but I had a one-time job that 
timed out with out-of-memory error. To fix that, I cloned a copy of my site 
(admin-console, manage, pack all), keeping the same database, then in db.py 
replaced every instance of 'reference my_big_tables' with 'integer' in the 
clone. It ran quickly and I then discarded the clone. If this helps anyone, 
then good.

Questions: 

Is it generally accepted that with big data tables, it's best to achieve 
referential integrity in the controller at the record-creation stage, and 
not add any rules into the database? 

My clone kept the requires statements: requires = IS_IN_DB(db, 
'my_big_tables.id'  ... and still ran fast so can the "reference 
my_big_tables" statement be safely, and completely eliminated from db.py? 
The "reference" statement really slows things down.

thanks,

Alex Glaros

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/8833de76-2fc7-4c3e-a6f6-b57e79d3bd05%40googlegroups.com.

Reply via email to