Re: Date vs Timestamp without timezone Partition Key

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Date vs Timestamp without timezone Partition Key
Дата
Msg-id 12135.1590382103@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Date vs Timestamp without timezone Partition Key  (Cedric Leong <cedricleong@gmail.com>)
Ответы Re: Date vs Timestamp without timezone Partition Key  (Cedric Leong <cedricleong@gmail.com>)
Список pgsql-performance
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



В списке pgsql-performance по дате отправления:

Предыдущее
От: Cedric Leong
Дата:
Сообщение: Date vs Timestamp without timezone Partition Key
Следующее
От: Kenneth Marshall
Дата:
Сообщение: PostgreSQL performance problem moving from 9.6.17 to 12.3