Re: How to deal with analyze gathering irrelevant stats

From: Rémi Chatenay <remi(dot)chatenay(at)doctolib(dot)com>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: Adam Brusselback <adambrusselback(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: How to deal with analyze gathering irrelevant stats
Date: 2021-01-11 16:52:25
Message-ID: CAA==ddmtauVVQf1xcnynkqEBNprn_O3HAfgJdk=2Ox9GFGUEOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I'd say it's a 1 insert for 5 - 10 updates.

As for the index on the status, it's because we have a job that runs every
night that deals with conversations in specific statuses. Having a low
cardinality index that changes frequently seems prone to mis-use by the
system. -> What would be an alternative ?

On Mon, Jan 11, 2021 at 5:48 PM Michael Lewis <mlewis(at)entrata(dot)com> wrote:

> What is the usage pattern of the conversations table? Is getting many
> inserts during the day, or updates of status mostly?
>
> Why have an index on the status column at all? My guess would be that
> there are 2-10 statuses, but many many rows in the table for most of those
> statuses. Having a low cardinality index that changes frequently seems
> prone to mis-use by the system.
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Lewis 2021-01-11 18:26:58 Re: How to deal with analyze gathering irrelevant stats
Previous Message Michael Lewis 2021-01-11 16:47:36 Re: How to deal with analyze gathering irrelevant stats