GDA: PostgreSQL empty slots table

Decibel! decibel at
Mon Feb 18 10:54:30 EST 2008

On Feb 11, 2008, at 9:09 PM, Mark Johnson wrote:
>> I'd be interested in any benchmarks you have.  Re SQL statement
>> length: the mysql document says there is a 16MB limit and I didn't  
>> see
>> any 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  decibel at
Give your computer some brain candy! Team #1828

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2563 bytes
Desc: not available
Url : 

More information about the gnucash-devel mailing list