Re: [GENERAL] Question slow query - Mailing list pgsql-general

From John R Pierce
Subject Re: [GENERAL] Question slow query
Date
Msg-id 9e5f31e6-a295-e5ed-60b2-6162aae8ef2a@hogranch.com
Whole thread Raw
In response to Re: [GENERAL] Question slow query  (Patrick B <patrickbakerbr@gmail.com>)
Responses Re: [GENERAL] Question slow query
List pgsql-general
On 1/16/2017 11:27 AM, Patrick B wrote:

Sorry about that.. just wanted to understand how to index a timestamp column. I was able to do this way:

CREATE INDEX CONCURRENTLY ON note (timezone('Etc/UTC'::text, d_date));


why did you prefix your index with timezone('etc/UTC'::text ???   that doesn't make sense to me at all.   is timezone() some function you've defined?  I'm not aware of any built in function by that name.


create index concurrently on table(columnname);   should index a timestamp column, the same as any other column.


you still haven't told us what query it is thats taking 25 seconds.


-- 
john r pierce, recycling bits in santa cruz

pgsql-general by date:

Previous
From: Venkata B Nagothi
Date:
Subject: Re: [GENERAL] Question slow query
Next
From: Adam Dratwiński
Date:
Subject: [GENERAL] Reading VARTAT EXTERNAL ONDISK value from logical replication decoder