Re: index on a box - Mailing list pgsql-general

From Tom Lane
Subject Re: index on a box
Date
Msg-id 13436.993136111@sss.pgh.pa.us
Whole thread Raw
In response to index on a box  (Dustin Sallings <dustin@spy.net>)
Responses Re: index on a box  (Dustin Sallings <dustin+postgres@spy.net>)
List pgsql-general
Dustin Sallings <dustin@spy.net> writes:
>     I was wondering, however, if there's a way I can use an index to
> avoid table scanning for this.

If you say "SET enable_seqscan TO off", and repeat the EXPLAIN, do you
get an indexscan plan?

I don't recommend doing such a SET for production purposes, but if this
works then the problem is just inaccurate selectivity/cost estimation.
I see that the on_pb operator has no selectivity estimator defined at
all :-( ... as a quick hack, try setting its oprrest and oprjoin to be
areasel and areajoinsel.

            regards, tom lane

pgsql-general by date:

Previous
From: Vivek Khera
Date:
Subject: Re: timestamp definition
Next
From: Tom Lane
Date:
Subject: Re: Authentification