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: 200409271131.09932.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Gaetano,

> 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

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mitch Pirtle 2004-09-27 18:59:13 Re: Caching of Queries
Previous Message Jeff 2004-09-27 18:25:55 Re: Caching of Queries