Use of to_timestamp causes full scan - Mailing list pgsql-performance

From Zaremba, Don
Subject Use of to_timestamp causes full scan
Date
Msg-id E3A785CF5322D611A20D0003474E0C3C9B5DCF@postal.ellacoya.com
Whole thread Raw
Responses Re: Use of to_timestamp causes full scan
List 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


pgsql-performance by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Hardware recommendations to scale to silly load
Next
From: Tom Lane
Date:
Subject: Re: Use of to_timestamp causes full scan