Re: Slow query on a one-tuple table

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Luís Roberto Weck <luisroberto(at)siscobra(dot)com(dot)br>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org, suporte(at)siscobra(dot)com(dot)br
Subject: Re: Slow query on a one-tuple table
Date: 2019-09-19 22:32:19
Message-ID: CAHOFxGosug4xfpieTqFdcFqwF-mK3hn8Tr9boN=jLFDU3y-JNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>
> I have about 6 bigint fields in this table that are very frequently
> updated, but none of these are indexed. I thought that by not having an
> index on them, would make all updates HOT, therefore not bloating the
> primary key index. Seems I was wrong?
>

HOT update is only possible if there is room in the page. How wide is your
single tuple?

Have you tuned autovacuum or are you running defaults? Not sure of your
perception of "very frequently" updated values, but if you have bloat
issue, vacuum early and often. Not sure how the math works out on a table
with single tuple in terms of calculating when it is time to vacuum, but it
certainly needs to be tuned differently than a table with millions of rows
which is what I would be more used to.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Luís Roberto Weck 2019-09-19 22:46:46 Re: Slow query on a one-tuple table
Previous Message Luís Roberto Weck 2019-09-19 22:27:34 Re: Slow query on a one-tuple table