Re: Slow queries on simple index

From: "Lillian Berry" <lillian(at)star-ark(dot)net>
To: "Andrei Lepikhov" <lepihov(at)gmail(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Cc: infra(at)pluralkit(dot)me
Subject: Re: Slow queries on simple index
Date: 2026-01-17 20:52:54
Message-ID: a985f55c-24fa-45aa-b373-8b30bc1e1fd3@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Hmm, where is the evidence that your query uses theindex? Maybe the
> generic plan accidentally forces SeqScan?

You may be correct - I just noticed that I am able to reproduce slow queries through my app. However, running the exact same queries in psql does use the index.

What might be different about my app's connections than psql? It uses Npgsql 9.0.2 on .NET 8, with these settings:

// src is "Host=[fdaa:9:e856:a7b:910f:0:a:102];Port=5432;Username=pluralkit;Database=pluralkit;Maximum Pool Size=150;Minimum Pool Size = 50;Max Auto Prepare=50"
var builder = new NpgsqlConnectionStringBuilder(src)
{
Pooling = true,
Enlist = false,
NoResetOnClose = true,
Timeout = 2
};

My understanding is slow query logs calculate the query time on the backend, and any client or network latency is not counted. Is this correct?

Kindly,
Lillian

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2026-01-17 21:10:45 Re: Slow queries on simple index
Previous Message Andrei Lepikhov 2026-01-17 20:21:36 Re: Slow queries on simple index