Re: Slow queries on simple index - Mailing list pgsql-performance

From Lillian Berry
Subject Re: Slow queries on simple index
Date
Msg-id a985f55c-24fa-45aa-b373-8b30bc1e1fd3@app.fastmail.com
Whole thread Raw
In response to Re: Slow queries on simple index  (Andrei Lepikhov <lepihov@gmail.com>)
List 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
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



pgsql-performance by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: Slow queries on simple index
Next
From: Tom Lane
Date:
Subject: Re: Slow queries on simple index