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

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <tgarnett(at)panjiva(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3
Date: 2011-03-16 17:44:31
Message-ID: 4D80B0AF020000250003B9B4@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Shaun Thomas 2011-03-16 18:34:52 Re: Re: Adding additional index causes 20,000x slowdown for certain select queries - postgres 9.0.3
Previous Message Tom Lane 2011-03-16 17:38:17 Re: Adding additional index causes 20, 000x slowdown for certain select queries - postgres 9.0.3