> 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
samequeries 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;MinimumPool 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