Re: Does indexing help >= as well as = for integer columns?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: TJ O'Donnell <tjo(at)acm(dot)org>
Cc: pgsql-general(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, lists(at)boutiquenumerique(dot)com
Subject: Re: Does indexing help >= as well as = for integer columns?
Date: 2005-02-02 15:29:24
Message-ID: 20050202152923.GG18657@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 02, 2005 at 06:51:13AM -0800, TJ O'Donnell wrote:
> I had thought that the Creation of the Index would do something
> equivalent to Analyze. I tried Analyze Verbose and it improved
> the scanner's ability to predict when an index would be useful.

Create index creates an index, analyze collects statistics. Neither
happens without being asked for...

> Last week, I asked about visualizing B-tree "coverage". I think
> I meant "Can I see the histograms that Analyze creates?"
> Are they available anywhere? The docs mention them (bins) and I
> was hoping Analyze Verbose would show them to me.

Maybe pg_statistic? You may need the oid of the column definition to
work out what goes where...

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vlad 2005-02-02 15:33:51 simple case syntax oddity in 8.0.0
Previous Message WireSpot 2005-02-02 15:19:57 Re: query time