Re: [HACKERS] Re: order by and index path

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: jwieck(at)debis(dot)com, andreas(dot)zeugswetter(at)telecom(dot)at, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: order by and index path
Date: 1998-10-15 16:12:22
Message-ID: 199810151612.MAA15304@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > We do not have this statistical information. So the whole
> > thing is at this time academic.
>
> I recall that Commercial Ingres made the assumption that one row (or 1%
> of rows? My memory of Ingres is fading :) would be returned from a
> qualified query if no statistics were available to suggest otherwise.
>
> It did collect statistics on data distribution to try to help make those
> optimizer choices.
>
> It may be reasonable to assume that if there is an index, then using it
> with any qualified query would be a win. Since the alternative is to
> decide to _not_ use an index, a decision for which we have no support
> with existing statistics.

For =, the assumion is 1 row, for > the assumption is 1/3 of the table.
With pg_statistic, it uses that.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-10-15 16:15:27 Re: [HACKERS] small bug in src/interfaces/ecpg/lib/Makefile.in
Previous Message Bruce Momjian 1998-10-15 16:09:26 Re: AW: [HACKERS] PostgreSQL v6.4 BETA2...