Re: Using EXPLAIN in regressions? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Using EXPLAIN in regressions?
Date
Msg-id 10202.1153433994@sss.pgh.pa.us
Whole thread Raw
In response to Using EXPLAIN in regressions?  (Joshua Reich <josh@root.net>)
Responses Re: Using EXPLAIN in regressions?  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Joshua Reich <josh@root.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


pgsql-hackers by date:

Previous
From: Ron Mayer
Date:
Subject: Re: Units in postgresql.conf
Next
From: Neil Conway
Date:
Subject: Re: Using EXPLAIN in regressions?