Re: Advice needed: query performance deteriorates by 2000% within 1 minute

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Peter Adlersburg <peter(dot)adlersburg(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Advice needed: query performance deteriorates by 2000% within 1 minute
Date: 2022-03-02 01:39:40
Message-ID: CAHOFxGrwwpu6NbUKpC=wsTdgtMLgXZ2m0rYFNXq9=OKVvfm-dQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

If you expect to have high cache hits and/or have ssd or similar fast
storage, random page cost should be more like 1-2 rather than the default
4. When using jsonb, you'd normally have estimates based solely on the
constants for the associated datatype (1/3 or 2/3 for a nullable boolean
for instance, and I think half a percent for an int column) but because you
are using an index on a function, you should be getting custom stats
related to that. They just don't seem to be helping you a ton.

With gin indexes, there is also the pending list to consider. I haven't had
to deal with that much, but just know of it from the documentation.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Lewis 2022-03-02 01:44:48 Re: Advice needed: query performance deteriorates by 2000% within 1 minute
Previous Message Ranier Vilela 2022-03-02 01:15:49 Re: An I/O error occurred while sending to the backend (PG 13.4)