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

Re: timestamp with time zone

From: Alessandro Gagliardi <alessandro(at)path(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: timestamp with time zone
Date: 2012-02-09 20:38:22
Message-ID: CAAB3BBJyVqQQKqDZSz3ankPuT0PcsNxfC6U_GaPCCLDVWBRpzA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
Still slow as mud: http://explain.depesz.com/s/Zfn

Now I've got indices on created, timezone, created at time zone timezone,
and (created at time zone timezone)::date. Clearly the problem isn't a lack
of indices!...except, wait, it's not actually using blocks_created_date_idx
(or blocks_created_at_timezone_idx). How do I make that happen?


On Thu, Feb 9, 2012 at 12:15 PM, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov
> wrote:

> Alessandro Gagliardi <alessandro(at)path(dot)com> wrote:
>
> > (Actually, I originally did try one on "(created at time zone
> > timezone)::date" but couldn't figure out how to phrase it in a way
> > PostgreSQL would accept.)
>
> CREATE INDEX blocks_created_date_idx
>  ON blocks
>  USING btree
>  (((created at time zone timezone)::date));
>
> -Kevin
>

In response to

Responses

pgsql-performance by date

Next:From: Peter van HardenbergDate: 2012-02-09 22:41:34
Subject: Re: random_page_cost = 2.0 on Heroku Postgres
Previous:From: Kevin GrittnerDate: 2012-02-09 20:15:26
Subject: Re: timestamp with time zone

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