Search Postgresql Archives

Re: Indices types, what to use. Btree, Hash, Gin or Gist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 31, 2009 at 1:33 PM, Gregory Stark <stark@xxxxxxxxxxxxxxxx> wrote:
> No index is going to be particularly effective for boolean columns unless
> they're very heavily skewed. You might find it useful to build separate
> partial indexes on other keys for each value though.

Not entirely true.  If you've got a table where <1% of the rows are
one or the other, a partial index can be very useful on a bool.

Also, in the very odd case where you almost all the time select all
the true or all the false, a regular index can be useful for
reindexing the table on.

But yeah, if there's a relatively even mix of true and false, then a
bool index isn't much use.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux