Use of to_timestamp causes full scan

From: "Zaremba, Don" <dzaremba(at)ellacoya(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Use of to_timestamp causes full scan
Date: 2003-09-02 17:50:14
Message-ID: E3A785CF5322D611A20D0003474E0C3C9B5DCF@postal.ellacoya.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Has anyone seen any performace problems with the use to to_timestamp?

When I use it in a where clause I get a full file scan, when I don't it
uses the index
for the query. The begin_time column is of type timestamp.

This does a full sequential scan
select id from details where begin_time > to_timestamp('03/08/25
18:30');

This uses the index
select id from details where begin_time > '03/08/25 18:30';

Don

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-09-02 18:06:56 Re: Use of to_timestamp causes full scan
Previous Message Ron Johnson 2003-09-02 17:45:19 Re: Hardware recommendations to scale to silly load