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'

[GENERAL] Query runs fast or slow

2006-04-16 Thread felix-accts-pgsql
I have a benchmark test which runs a query very slowly under certain circumstances. I used Ethereal to capture the packet traffic, and also enabled debug5 logging out of curiousity. While the slow query is in progress, there is no log or packet activity, but the cpu is busy. These packets are be