Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-05-12 Thread Matteo Beccati
Hi, The histogram values seem completely meaningless in this context --- for containment purposes, they are just ten or so randomly chosen values. I don't believe that the estimator works better with them. Certainly, whether the column is unique or not is totally irrelevant to whether they are

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-05-12 Thread Tom Lane
Matteo Beccati <[EMAIL PROTECTED]> writes: > It was a big surprise having no improvements at all in the query I used > for all my previous tests, until I found out that the test against > histogram values was removed by Tom. I strongly think it should be > reintroduced: ltree columns are likely

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-05-12 Thread Matteo Beccati
Hi, Bruce Momjian ha scritto: Uh, I just moved the selectivity function over to /contrib/ltree, and moved what I needed, so it now works. You can continue with the plan above, or I can. I've just been able to install a 8.2-devel to test the ltree selectivity improvements I suggested. It w

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> I'm willing to work on this, but it doesn't look like you reverted the > >> prior patch yet? > > > Uh, I just moved the selectivity function over to /contrib/ltree, and > > moved what I needed, so it now works. You can continue wit

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> I'm willing to work on this, but it doesn't look like you reverted the >> prior patch yet? > Uh, I just moved the selectivity function over to /contrib/ltree, and > moved what I needed, so it now works. You can continue with the plan > above, or I can.

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> What really needs to happen next is to think about which bits of > >> selfuncs.c should be exposed --- what's generally useful, and do we > >> think that it has an API clean/stable enough to expose? > > > Well, the ltree routine jus

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> What really needs to happen next is to think about which bits of >> selfuncs.c should be exposed --- what's generally useful, and do we >> think that it has an API clean/stable enough to expose? > Well, the ltree routine just needs struct VariableStatDat

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Bruce Momjian
Matteo Beccati wrote: > Bruce Momjian ha scritto: > > Your patch has been added to the PostgreSQL unapplied patches list at: > > > > http://momjian.postgresql.org/cgi-bin/pgpatches > > > > It will be applied as soon as one of the PostgreSQL committers reviews > > and approves it. > > Great.

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > OK, reverted, but I saw it using contsel() so I figured we were allowing > > it, but I see contsel() is used by our "box", so ltree was just using > > something that was already there. Let me see if I can break out the new > > selectivity function into

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Tom Lane
Bruce Momjian writes: > OK, reverted, but I saw it using contsel() so I figured we were allowing > it, but I see contsel() is used by our "box", so ltree was just using > something that was already there. Let me see if I can break out the new > selectivity function into /contrib. What really nee

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Cleaned-up patch attached and applied. > > Please revert this patch. This has not been updated to satisfy the > previous agreement about how it should work. It is completely > inappropriate to be dropping code that's specific to one contrib module > i

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Tom Lane
Bruce Momjian writes: > Cleaned-up patch attached and applied. Please revert this patch. This has not been updated to satisfy the previous agreement about how it should work. It is completely inappropriate to be dropping code that's specific to one contrib module into the core selfuncs.c file.

Re: [PATCHES] [HACKERS] Enhanced containment selectivity function

2006-04-26 Thread Bruce Momjian
Cleaned-up patch attached and applied. Catalog version updated in separate patch. --- Matteo Beccati wrote: > Hi, > > >>Moving it in contrib/ltree would be more difficult to me because it > >>depends on other functions d