From: Tom Lane <tgl@sss.pgh.pa.us>
To: Niccolo Rigacci <niccolo@rigacci.org>
Cc: John A Meinel <john@arbash-meinel.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: CURSOR slowes down a WHERE clause 100 times?
Date: Thu, 07 Jul 2005 09:59:33 -0400
Message-ID: <7484.1120744773@sss.pgh.pa.us> (raw)
In-Reply-To: <20050707074147.GA16360@rigacci.org>
References: <20050706211946.GA3460@rigacci.org>
<42CC4D1C.9040606@arbash-meinel.com>
<20050707074147.GA16360@rigacci.org>
Niccolo Rigacci <niccolo@rigacci.org> writes:
> How can I EXPLAIN ANALYZE a cursor like this?
> BEGIN;
> DECLARE mycursor BINARY CURSOR FOR
> SELECT ...
> FETCH ALL IN mycursor;
> END;
> I tried to put EXPLAIN ANALYZE in front of the SELECT and in
> front of the FETCH, but I got two "syntax error"...
Just FYI, you can't EXPLAIN ANALYZE this, but you can EXPLAIN it:
EXPLAIN DECLARE x CURSOR FOR ...
so you can at least find out what the plan is.
It might be cool to support EXPLAIN ANALYZE FETCH --- not sure what that
would take.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, niccolo@rigacci.org, john@arbash-meinel.com
Subject: Re: CURSOR slowes down a WHERE clause 100 times?
In-Reply-To: <7484.1120744773@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox