Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3 - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3
Date
Msg-id 4D80B0AF020000250003B9B4@gw.wicourts.gov
Whole thread Raw
Responses Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3  (Shaun Thomas <sthomas@peak6.com>)
List pgsql-performance
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:

>> We've seen a lot of those lately -- Index Scan Backward
>> performing far worse than alternatives.
>
> It's not clear to me that that has anything to do with Tim's
> problem.  It certainly wouldn't be 20000x faster if it were a
> forward scan.

Well, that's one way of looking at it.  Another would be that the
slower plan with the backward scan was only estimated to be 14.5%
less expensive than the fast plan, so a pretty moderate modifier
would have avoided this particular problem.  The fact that the
backward scan mis-estimate may be combining multiplicatively with
other mis-estimates doesn't make it less important.

-Kevin


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3
Next
From: Shaun Thomas
Date:
Subject: Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3