Re: How can I check if my cursor statement is using index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dragan Matić <mlists(at)panforma(dot)co(dot)yu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I check if my cursor statement is using index
Date: 2005-09-29 15:44:42
Message-ID: 12543.1128008682@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?UTF-8?B?RHJhZ2FuIE1hdGnEhw==?= <mlists(at)panforma(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2005-09-29 16:19:33 Re: Triggers after a rule
Previous Message Devrim GUNDUZ 2005-09-29 15:16:38 Re: 8.0.1 SRPM on RHEL v.3