pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Cedric Leong <cedricleong@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Date vs Timestamp without timezone Partition Key
Date: Mon, 25 May 2020 00:48:23 -0400
Message-ID: <12135.1590382103@sss.pgh.pa.us> (raw)
In-Reply-To: <CAD6i=X0h3RJFes4E662-HbQRGCV+HcAPjAJbK8vLSVFM20RK6w@mail.gmail.com>
References: <CAD6i=X0h3RJFes4E662-HbQRGCV+HcAPjAJbK8vLSVFM20RK6w@mail.gmail.com>

Cedric Leong <cedricleong@gmail.com> writes:
> Just in case someone is interested enough to answer this. Does anyone know
> if the performance for a date column vs a timestamp column as a partition
> key is large?

I doubt it's even measurable, at least on 64-bit machines.  You're
basically talking about 32-bit integer comparisons vs 64-bit integer
comparisons.

On a 32-bit machine it's possible that an index on a date column
will be physically smaller, so you could get some wins from reduced
I/O.  But on (most?) 64-bit machines that difference goes away too,
because of alignment restrictions.

As always, YMMV; it never hurts to do your own testing.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <12135.1590382103@sss.pgh.pa.us>
Permalink:  ../12135.1590382103@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12135.1590382103@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, cedricleong@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Date vs Timestamp without timezone Partition Key
  In-Reply-To: <12135.1590382103@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