Re: Select query takes long to execute

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: SZUCS Gábor <surrano(at)mailbox(dot)hu>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Select query takes long to execute
Date: 2003-05-30 12:13:11
Message-ID: 20030530121311.GB8920@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, May 30, 2003 at 10:57:33 +0200,
SZUCS Gábor <surrano(at)mailbox(dot)hu> wrote:
> Nikolaus,
>
> I think that shouldn't be any more effective. As I experienced, it's
> irrelevant how many cols an index has as long as you only use the first
> column. And, after that, if you use another column, how could a missing
> second column be any better?

Because the index will be more compact and reside on less disk blocks.
The planner also makes different guesses for the selectivity whne using
the first column of a multicolumn index as opposed to a single column
index.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-05-30 13:11:39 Re: db growing out of proportion
Previous Message Bruno Wolff III 2003-05-30 12:11:01 Re: Table Relationships