I have a qry which has a where clause as : WHERE CAST(DT AS CHAR(10)) BETWEEN '2000-01-01' AND '2011-01-01')
Can changing this to 'Cast as date' OR Extract (date) improve the qry and still give same results? DT is a timestamp field. Basiclly my qsn is , shd we convert a timestamp to date or character for comparsion? CAST uses to much memory so wud Extract be a batter option?
WHERE CAST(DT AS date )BETWEEN '2000-01-01' AND '2011-01-01')