Re: Advice needed: query performance deteriorates by 2000% within 1 minute - Mailing list pgsql-performance

From Michael Lewis
Subject Re: Advice needed: query performance deteriorates by 2000% within 1 minute
Date
Msg-id CAHOFxGrwwpu6NbUKpC=wsTdgtMLgXZ2m0rYFNXq9=OKVvfm-dQ@mail.gmail.com
Whole thread Raw
In response to Re: Advice needed: query performance deteriorates by 2000% within 1 minute  (Peter Adlersburg <peter.adlersburg@gmail.com>)
Responses Re: Advice needed: query performance deteriorates by 2000% within 1 minute  (Michael Lewis <mlewis@entrata.com>)
List 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.

pgsql-performance by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: An I/O error occurred while sending to the backend (PG 13.4)
Next
From: Michael Lewis
Date:
Subject: Re: Advice needed: query performance deteriorates by 2000% within 1 minute