Re: Using EXPLAIN in regressions?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joshua Reich <josh(at)root(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Using EXPLAIN in regressions?
Date: 2006-07-20 22:19:54
Message-ID: 10202.1153433994@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joshua Reich <josh(at)root(dot)net> writes:
> Is it safe to use the output of EXPLAIN in regression tests?

No, not unless you want the test to break every other week.

> I want to
> make sure that certain GiST indexes are being used by sample queries,

About the best bet is to make sure that's the *only* available index,
and set enable_seqscan = off to be sure.

In some cases, you can use the ordering of the returned rows as a proxy
--- if they're returned in something other than heap order then it must
have used an index. I'm not sure if this will be a stable answer for
GIST indexes though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2006-07-20 22:51:27 Re: Using EXPLAIN in regressions?
Previous Message Ron Mayer 2006-07-20 22:16:43 Re: Units in postgresql.conf