Skip site navigation (1) Skip section navigation (2)

Re: best statistic target for boolean columns

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: best statistic target for boolean columns
Date: 2004-09-27 18:31:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

> don't you think the best statistic target for a boolean
> column is something like 2?  Or in general the is useless
> have a statistics target > data type cardinality ?

It depends, really, on the proportionality of the boolean values; if they're 
about equal, I certainly wouldn't raise Stats from the default of 10.   If, 
however, it's very dispraportionate -- like 2% true and 98% false -- then it 
may pay to have better statistics so that the planner doesn't assume 50% 
hits, which it otherwise might.


Josh Berkus
Aglio Database Solutions
San Francisco

In response to


pgsql-performance by date

Next:From: Mitch PirtleDate: 2004-09-27 18:59:13
Subject: Re: Caching of Queries
Previous:From: JeffDate: 2004-09-27 18:25:55
Subject: Re: Caching of Queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group