Index on timestamp fields - Mailing list pgsql-novice

From David Gardner
Subject Index on timestamp fields
Date
Msg-id C975BFE03CC5DE4999143A5BEA9FB515021DC0C51F@yucex.lax.yucwin
Whole thread Raw
Responses Re: Index on timestamp fields  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Index on timestamp fields  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-novice
I have a timestamp without timezone field in one of my tables that is used in the where clause of one of my queries:
WHERE date_trunc('day',"backupReports"."start")= current_date

I also built an index on that column, I'm assuming that by using the date_trunc() function in my where clause forces
pgsqlto perform a sequential scan. 
Is there a better way to do this? The query needs to return the full timestamp, although I am only selecting by date so
changingthe data type for the column won't work. 

Also would saving the value of current_date to a local variable improve performance?

---
David Gardner, IT
The Yucaipa Companies
(310) 228-2855


pgsql-novice by date:

Previous
From: "Lonni J Friedman"
Date:
Subject: Re: querying the age of a row
Next
From: Tom Lane
Date:
Subject: Re: Index on timestamp fields