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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: index vs. seq scan choice?


  • From: PFC <lists(at)peufeu(dot)com>
  • To: "Steve Atkins" <steve(at)blighty(dot)com>, "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: index vs. seq scan choice?
  • Date: Fri, 25 May 2007 10:09:17 +0200
  • Message-id: <op(dot)tsvh9ra1cigqcu(at)apollo13>


Would it be possible to look at a much larger number of samples during analyze,
then look at the variation in those to generate a reasonable number of
pg_statistic "samples" to represent our estimate of the actual distribution?
More datapoints for tables where the planner might benefit from it, fewer
where it wouldn't.

Maybe it would be possible to take note somewhere of the percentage of occurence of the most common value (in the OP's case, about 3%), in which case a quick decision can be taken to use the index without even looking at the value, if we know the most common one is below the index use threshold...



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group