Re: Performance of a query

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Edmund Dengler <edmundd(at)eSentire(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance of a query
Date: 2003-06-12 00:44:35
Message-ID: 20030612004435.GA20433@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 11, 2003 at 20:11:02 -0400,
Edmund Dengler <edmundd(at)eSentire(dot)com> wrote:
> Greetings all!
>
> So I have had a look at the documentation to see what options I have in
> separating the "select now() - '2 hours'::interval" from the rest of my
> query. As far as I can tell, I have the following options:

How about using local_timestamp instead of now? It returns a timestamp
instead of a timestamptz and I suspect will do what you want.
Whatever you are comparing it to will also need to be of type
timestamp. I suspect that you should be careful when setting timezone in your
transaction when doing things this way.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Edmund Dengler 2003-06-12 00:51:39 Re: Performance of a query
Previous Message Bruno Wolff III 2003-06-12 00:31:22 Generalizing max and min