Re: [GENERAL] Query runs fast or slow

2006-04-17 Thread felix
On Sun, Apr 16, 2006 at 04:32:25PM -0400, Tom Lane wrote: > [EMAIL PROTECTED] writes: > > EXPLAIN ANALYZE doesn't show the slow timing > > because it requires values, not $n placeholders, > > To analyze the plan used for a parameterized query, try > > PREPARE foo(...) AS SELECT ... $n ... >

Re: [GENERAL] Query runs fast or slow

2006-04-16 Thread felix
On Sun, Apr 16, 2006 at 04:32:25PM -0400, Tom Lane wrote: > To analyze the plan used for a parameterized query, try > > PREPARE foo(...) AS SELECT ... $n ... > > EXPLAIN ANALYZE EXECUTE foo(...) > > But I already know what you're going to find: the planner's estimates > for the rang

Re: [GENERAL] Query runs fast or slow

2006-04-16 Thread Tom Lane
[EMAIL PROTECTED] writes: > EXPLAIN ANALYZE doesn't show the slow timing > because it requires values, not $n placeholders, To analyze the plan used for a parameterized query, try PREPARE foo(...) AS SELECT ... $n ... EXPLAIN ANALYZE EXECUTE foo(...) But I already know what you'