Skip site navigation (1) Skip section navigation (2)

Re: efficient data reduction (and deduping)

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Alessandro Gagliardi" <alessandro(at)path(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: efficient data reduction (and deduping)
Date: 2012-03-01 20:12:02
Message-ID: 4F4F83B20200002500045D82@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-performance
Alessandro Gagliardi <alessandro(at)path(dot)com> wrote:
 
> All of our servers run in UTC specifically to avoid this sort of
> problem. It's kind of annoying actually, because we're a San
> Francisco company and so whenever I have to do daily analytics, I
> have to shift everything to Pacific. But in this case it's handy.
 
If that's working for you, you might just want to leave it alone;
but just so you know:
 
If you declare the column as TIMESTAMP WITH TIME ZONE, that it
stores the timestamp as UTC regardless of what your server's
definition of time zone is.  (It doesn't actually store the time
zone -- it just normalizes the time into UTC for storage.)  On
retrieval it shows that UTC moment in the local timezone.  So, all
that work you're doing to switch the time zone info around would be
pretty automatic if you used the other type.
 
-Kevin

In response to

pgsql-performance by date

Next:From: Marti RaudseppDate: 2012-03-01 20:51:52
Subject: Re: Large insert and delete batches
Previous:From: Claudio FreireDate: 2012-03-01 19:44:22
Subject: Re: efficient data reduction (and deduping)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group