From: Matteo Beccati <php@beccati.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrea Arcangeli <andrea@cpushare.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: NOT LIKE much faster than LIKE?
Date: Tue, 10 Jan 2006 10:08:45 +0100
Message-ID: <43C3799D.5030103@beccati.com> (raw)
In-Reply-To: <24372.1136861684@sss.pgh.pa.us>
References: <20060110014447.GB18474@opteron.random>
<24021.1136858688@sss.pgh.pa.us>
<20060110022303.GA20168@opteron.random>
<24372.1136861684@sss.pgh.pa.us>
Hi,
> I did just think of something we could improve though. The pattern
> selectivity code doesn't make any use of the statistics about "most
> common values". For a constant pattern, we could actually apply the
> pattern test with each common value and derive answers that are exact
> for the portion of the population represented by the most-common-values
> list. If the MCV list covers a large fraction of the population then
> this would be a big leg up in accuracy. Dunno if that applies to your
> particular case or not, but it seems worth doing ...
This reminds me what I did in a patch which is currently on hold for the
next release:
http://momjian.postgresql.org/cgi-bin/pgpatches_holdhttp://candle.pha.pa.us/mhonarc/patches_hold/msg00026.html
The patch was addressing a similar issue when using ltree <@ and @>
operator on an unbalanced tree.
Best regards
--
Matteo Beccati
http://phpadsnew.comhttp://phppgads.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: php@beccati.com, tgl@sss.pgh.pa.us, andrea@cpushare.com
Subject: Re: NOT LIKE much faster than LIKE?
In-Reply-To: <43C3799D.5030103@beccati.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox