[SQL] implementing an out-of-transaction trigger

2004-09-14 Thread Iain
(B (B (BHi All, (B  (BI've come across a situation where I'd (Blike to use some kind of "out-of-transaction trigger" to do some processing (Bafter changes to some tables, but without extending the duration of the main (Btransaction. Of course, it's important that the processing be compl

Re: [SQL] explain analyze results are different for each iteration

2004-09-14 Thread Stephan Szabo
On Tue, 14 Sep 2004, Robert Davis wrote: > I'm trying to benchmark some complex sql queries. One query, in > particular, is causing problems -- its cost values can vary from 228 > to 907, its Total Runtimes from 60 ms to 5176 ms. The query plans > show that the optimizer is choosing different pl

Re: [SQL] explain analyze results are different for each iteration

2004-09-14 Thread Gregory S. Williamson
Are you forcing stuff out of cache (both postgres and OS) ? I've found that this can make a huge difference with some queries ... not sure that this would make it have different plans, though. My ill-informied $0.02 worth ... fwiw Greg Williamson DBA GlobeXplorer LLC -Original Message

[SQL] explain analyze results are different for each iteration

2004-09-14 Thread Robert Davis
I'm trying to benchmark some complex sql queries. One query, in particular, is causing problems -- its cost values can vary from 228 to 907, its Total Runtimes from 60 ms to 5176 ms. The query plans show that the optimizer is choosing different plans for different iterations of the same query