Re: Perf differences between timestamp and timestamp with timezone

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Perf differences between timestamp and timestamp with timezone
Дата
Msg-id 200906160152.n5G1qd719240@momjian.us
обсуждение исходный текст
Ответ на Perf differences between timestamp and timestamp with timezone  (Mike Christensen <mike@kitchenpc.com>)
Ответы Re: Perf differences between timestamp and timestamp with timezone  (Mike Christensen <mike@kitchenpc.com>)
Список pgsql-general
Mike Christensen wrote:
> Hi all -
>
> I'm considering changing all my "timestamp" columns to "timestamp with
> timezone" columns instead.  The reason is I want to use UTC time for
> everything in the DB and on the web server, and only ever convert to local
> time on the client itself.  I could use a timestamp and just "know" that the
> timezone is UTC, but npgsql seems to handle this a lot better (like set the
> "Kind" property to UTC, etc) if you have a timestamptz column type.
>
> I'm curious if there's any perf drawbacks to doing this, or would the only
> perf hit be if I were comparing timestamp with timestamptz and doing all
> sorts of casts and stuff.  Thanks!

I don't think there is any measurable difference in the two data types,
and timestamptz is usually superior, as you have found.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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

Предыдущее
От: Mike Christensen
Дата:
Сообщение: Perf differences between timestamp and timestamp with timezone
Следующее
От: Just Someone
Дата:
Сообщение: Re: Amazon EC2 | Any recent developments