Re: BETWEEN optimizer problems with single-value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-performance(at)postgresql(dot)org, Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Subject: Re: BETWEEN optimizer problems with single-value
Date: 2006-03-16 19:45:34
Message-ID: 19304.1142538334@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2006-03-16 19:46:11 Re: qsort, once again
Previous Message Dann Corbit 2006-03-16 19:45:05 Re: qsort, once again

Browse pgsql-performance by date

  From Date Subject
Next Message Simon Riggs 2006-03-16 20:00:19 Re: BETWEEN optimizer problems with single-value
Previous Message Simon Riggs 2006-03-16 19:43:22 Re: BETWEEN optimizer problems with single-value