From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Karl Denninger <karl(at)denninger(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Planner question - "bit" data types |
Date: | 2009-09-18 02:29:08 |
Message-ID: | 200909180229.n8I2T8q07981@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Alvaro Herrera wrote:
> Karl Denninger escribi?:
>
> > The individual boolean fields don't kill me and in terms of some of the
> > application issues they're actually rather easy to code for.
> >
> > The problem with re-coding for them is extensibility (by those who
> > install and administer the package); a mask leaves open lots of extra
> > bits for "site-specific" use, where hard-coding booleans does not, and
> > since the executable is a binary it instantly becomes a huge problem for
> > everyone but me.
>
> Did you try hiding the bitmask operations inside a function as Tom
> suggested?
Yes. In addition, functions that are part of expression indexes do get
their own optimizer statistics, so it does allow you to get optimizer
stats for your test without having to use booleans.
I see this documented in the 8.0 release notes:
* "ANALYZE" now collects statistics for expression indexes (Tom)
Expression indexes (also called functional indexes) allow users
to index not just columns but the results of expressions and
function calls. With this release, the optimizer can gather and
use statistics about the contents of expression indexes. This will
greatly improve the quality of planning for queries in which an
expression index is relevant.
Is this in our main documentation somewhere?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Karl Denninger | 2009-09-18 03:10:07 | Re: Planner question - "bit" data types |
Previous Message | André Volpato | 2009-09-17 21:02:08 | Re: Use of BETWEEN with identical values |