Re: How to find out programmatically whether a query on a view will use an index?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to find out programmatically whether a query on a view will use an index?
Date: 2005-01-24 17:12:42
Message-ID: 22476.1106586762@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

=?iso-8859-1?Q?Martin_Sch=E4fer?= <Martin(dot)Schaefer(at)cadcorp(dot)com> writes:
> Using 'EXPLAIN SELECT ...' does tell me whether the spatial index is used,
> but the output is not machine readable. I guess the output is localized to
> the current locale,

AFAIK it's not localized, so grepping for "Index" would probably work.

> Is there no way to get a machine readable query plan?

No, and no such API is likely to be defined in the future either,
because we reserve the right to change plan structures at any time.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kevin Duffy 2005-01-24 17:14:22 Moving from Transact SQL to PL/pgSQL
Previous Message Martin Schäfer 2005-01-24 16:34:09 How to find out programmatically whether a query on a view will use an index?