Re: How can I check if my cursor statement is using index - Mailing list pgsql-general

From Tom Lane
Subject Re: How can I check if my cursor statement is using index
Date
Msg-id 12543.1128008682@sss.pgh.pa.us
Whole thread Raw
In response to How can I check if my cursor statement is using index  (Dragan Matić <mlists@panforma.co.yu>)
List pgsql-general
=?UTF-8?B?RHJhZ2FuIE1hdGnEhw==?= <mlists@panforma.co.yu> writes:
> I have a program that reads data from Postgresql database (version
> 8.0.3) through ODBC, but data retrieval is pretty slow. When I type the
> same SQL sentence in pgadmin III or any other sql tool it is much
> faster, and typing 'explain' clearly shows that it is using index.
> However the program is reading data through a dynamic cursor, I would
> like to know if there is a way to check if the same sql query generated
> through dynamic cursor still uses indexes?

Try EXPLAIN DECLARE x CURSOR FOR ...

            regards, tom lane

pgsql-general by date:

Previous
From: merlyn@stonehenge.com (Randal L. Schwartz)
Date:
Subject: Re: Perl regular expressions
Next
From: Jan Wieck
Date:
Subject: Re: Triggers after a rule