I am doing a simple select but converting a date from epoch timestamp to 1 second, for last 15 days of data. What I have works fine but its very slow. Any ideas ?

select a.* from test a
where date_trunc('day', (timestamp 'epoch' + a.start * interval '1 second')) >= (CURRENT_DATE - interval '15 day')::date
order by a.start
Also I want to run this between 2 specific dates. any ideas on that one also ?

thanks for any help.