> Then, a query for each getattr : > 1/QueryOne: SELECT thastate_id FROM validdata WHERE id = 78 > 1/QueryR : SELECT thastate_id FROM validdata WHERE id = 78 > 1/COMMIT : auto > 1/QueryOne: SELECT tsastate_id FROM validdata WHERE id = 78 > 1/QueryR : SELECT tsastate_id FROM validdata WHERE id = 78 > 1/COMMIT : auto
This isn't what I would expect, using cacheValues = True (default in sqlmeta). And if there are really just 8 possible states (or some other small number of shared states, not clear), those should be fairly quickly cached as instances so that validdata records that refer to an already loaded state row shouldn't be executing any queries. I would expect one query for the select, which (using cacheValues) should populate the instances with the foreign key IDs (so vdata.thastate_id shouldn't be another query), and then initially a query for each not-yet-cached validstate instance. I've verified this in my own use of SQLObject (using svn SQLObject and connection.cache=True, sqlmeta.cacheValues=True). - Luke ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
