Re: [BUGS] BUG #11500: PRIMARY KEY index not being used

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #11500: PRIMARY KEY index not being used
Date: 2025-10-05 06:41:06
Message-ID: CAL9smLDdQDroWSqpEXpo7Pkuyw+vt0DL2=Z4RzHLC+WQDKK2ZQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Oct 4, 2025 at 8:17 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > On Sat, 4 Oct 2025 at 15:40, Marko Tiikkaja <marko(at)joh(dot)to> wrote:
> >> On Fri, Oct 3, 2025 at 16:31 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >>> You haven't given us a lot to go on: no reproducible test case,
>
> >> I've provided two. Both make the planner look bad.
>
> You've provided *no* reproducible test case that makes the planner
> look bad. The filled-in test case has two possibilities that are
> both pretty cheap and the planner knows they are pretty cheap, so
> it hardly matters which one it takes. You showed us a fragment
> of a case where it chose a very expensive scan that it shouldn't
> have, but no useful information about how to reproduce that.

Hardly matters? I'd say 54.682 ms vs. 0.077 ms is a big deal.
Especially because the planner doesn't seem to have any idea what the
upper bound on the first one could be.

.m

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Marco Boeringa 2025-10-05 08:55:01 Potential "AIO / io workers" inter-worker locking issue in PG18?
Previous Message Marko Tiikkaja 2025-10-05 06:38:14 Re: [BUGS] BUG #11500: PRIMARY KEY index not being used