Re: BETWEEN optimizer problems with single-value - Mailing list pgsql-performance

From Tom Lane
Subject Re: BETWEEN optimizer problems with single-value
Date
Msg-id 19304.1142538334@sss.pgh.pa.us
Whole thread Raw
In response to Re: BETWEEN optimizer problems with single-value  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: BETWEEN optimizer problems with single-value
List pgsql-performance
Simon Riggs <simon@2ndquadrant.com> writes:
> I was thinking that we would fill out the OpExpr with different
> opclasses for each plan, so each one sees a different story. (I was
> thinking there was a clauselist for each plan; if not, there could be.)

This is backwards: there isn't a plan yet.  If there were, having
clauselist_selectivity return different answers depending on what index
the plan was thinking of using would still be wrong.

> [BTW how do you add new indexes to system tables? I want to add one to
> pg_inherits but not sure where to look.]

src/include/catalog/indexing.h

Offhand I think adding a new entry is all you have to do.  You may also
want a syscache to go with it, which'll take a bit more work.

            regards, tom lane

pgsql-performance by date:

Previous
From: Simon Riggs
Date:
Subject: Re: BETWEEN optimizer problems with single-value
Next
From: Simon Riggs
Date:
Subject: Re: BETWEEN optimizer problems with single-value