Re: [PERFORM] declared cursor uses slow plan

2004-09-16 Thread Tom Lane
Kevin Neufeld <[EMAIL PROTECTED]> writes: > I have a relatively simple query that takes about 150ms using explain > analyze. However, when I wrap the same query in a declared cursor > statement, the subsequent fetch statement takes almost 30seconds. For > some reason, the planner decided to do a

[PERFORM] declared cursor uses slow plan

2004-09-15 Thread Kevin Neufeld
Why would postgres use a different query plan for declared cursors than without? I have a relatively simple query that takes about 150ms using explain analyze. However, when I wrap the same query in a declared cursor statement, the subsequent fetch statement takes almost 30seconds. For some re