From: | Mike Christensen <mike(at)kitchenpc(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Perf differences between timestamp and timestamp with timezone |
Date: | 2009-06-16 02:24:17 |
Message-ID: | 7aa638e00906151924i10dc2353sab5eaf4070d58c36@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Awesome! One more followup question..
If I modify an existing table from timestamp to timestamptz, will it use the
current system timezone? If so, how can I modify all the rows to convert to
UTC time (basically add 8 hrs to everything)..
On Mon, Jun 15, 2009 at 6:52 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> 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(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2009-06-16 02:53:04 | Re: Perf differences between timestamp and timestamp with timezone |
Previous Message | Just Someone | 2009-06-16 01:53:00 | Re: Amazon EC2 | Any recent developments |