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

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

On Mon, 6 Oct 2025 at 23:39, Marko Tiikkaja <marko(at)joh(dot)to> wrote:
> On the production server the query still consistently took ~100ms even
> after all that maintenance had been done. Compared to <0.05ms when
> going through the primary key.

This part surprises me. Is this on a standby server or primary? Are
you certain that no rows are matching the state = 'WAIT_EVENT' qual?

David

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dilip Kumar 2025-10-06 12:04:36 Re: BUG #19074: pg_dump from v18 loses the NOT NULL flag in the inherited table field when dumping v17-databases
Previous Message Álvaro Herrera 2025-10-06 10:44:28 Re: BUG #19074: pg_dump from v18 loses the NOT NULL flag in the inherited table field when dumping v17-databases