On Feb 11, 2008, at 9:09 PM, Mark Johnson wrote:
I'd be interested in any benchmarks you have. Re SQL statementlength: the mysql document says there is a 16MB limit and I didn't seeany limit in the sqlite documentation. Is there a way of doing something like:SELECT DISTINCT tx_guid FROM splits .... /* and save the results */SELECT * FROM transansactions WHERE guid IN results_from_above_query /* and return the results */ SELECT * FROM splits WHERE tx_guid IN results_from_above_query /* and return the results */i.e. have the engine cache the results of the 1st query and reuse it in subsequent queries without needing to recompute?
Use a TEMP table to store the results of the first query. Note that you'll get better results on the 2nd and 3rd queries if you update stats on the temp table; that would be ANALYZE in Postgres; not sure about MySQL.
-- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team #1828
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel