brandonsavage/socorro — comment on commit 3e30315c1945a18fcceedc6e21dc30ca0c354ff0
File:  line 0
By jberkus:

Brandon,

You want to use different SQL, like this:

reports.date_processed BETWEEN date_trunc('day', (TIMESTAMPTZ $date - INTERVAL $interval)) AND $date

that will both get you the correct data types to use the indexes, and give you all crashes between midnight on the selected day and now.