pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: peter plachta <pplachta@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: High QPS, random index writes and vacuum
Date: Mon, 17 Apr 2023 22:01:05 -0400
Message-ID: <2548533.1681783265@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGTqnmbqhQWSDVOX+1ehQW5en=YCaXghnoRUh6tnnPeQex_OwQ@mail.gmail.com>
References: <CAGTqnmbqhQWSDVOX+1ehQW5en=YCaXghnoRUh6tnnPeQex_OwQ@mail.gmail.com>

peter plachta <pplachta@gmail.com> writes:
> The company I work for has a large (50+ instances, 2-4 TB each) Postgres
> install. One of the key problems we are facing in vanilla Postgres is
> vacuum behavior on high QPS (20K writes/s), random index access on UUIDs.

Indexing on a UUID column is an antipattern, because you're pretty much
guaranteed the worst-case random access patterns for both lookups and
insert/delete/maintenance cases.  Can you switch to timestamps or
the like?

There are proposals out there for more database-friendly ways of
generating UUIDs than the traditional ones, but nobody's gotten
around to implementing that in Postgres AFAIK.

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <2548533.1681783265@sss.pgh.pa.us>
Permalink:  ../2548533.1681783265@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2548533.1681783265@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pplachta@gmail.com
  Subject: Re: High QPS, random index writes and vacuum
  In-Reply-To: <2548533.1681783265@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox