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

Re: [HACKERS] Bad n_distinct estimation; hacks suggested?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-perform <pgsql-performance(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
Date: 2005-04-25 19:18:26
Message-ID: 200504251218.27072.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
Guys,

> While it's not possible to get accurate estimates from a fixed size sample,
> I think it would be possible from a small but scalable sample: say, 0.1% of
> all data pages on large tables, up to the limit of maintenance_work_mem.

BTW, when I say "accurate estimates" here, I'm talking about "accurate enough 
for planner purposes" which in my experience is a range between 0.2x to 5x.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

pgsql-performance by date

Next:From: Ron MayerDate: 2005-04-25 20:14:25
Subject: half the query time in an unnecessary(?) sort?
Previous:From: Josh BerkusDate: 2005-04-25 19:13:18
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?

pgsql-hackers by date

Next:From: Hans-Jürgen SchönigDate: 2005-04-25 19:22:21
Subject: Re: Constant WAL replay
Previous:From: Josh BerkusDate: 2005-04-25 19:13:18
Subject: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?

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