Hi all,
I am trying to optimize the queries in my application. Is there a performance difference between (to_char(myDate ,format) < myString) and (myDate < to_date(myStrin g, format)).
ex. Select * from myTable where (to_char(fieldD ate, 'MM/DD/YYY') <= queryDate )
or Select * from myTable where (fieldDate <= to_date(queryDa te, 'MM/DD/YYYY') )
assuming fieldDate is a date or timestamp field and queryDate is '01/01/2007', a string.
Also, does it matter if the to_date or to_char condition is listed before or after the string variable? Thank you for your help.
I am trying to optimize the queries in my application. Is there a performance difference between (to_char(myDate ,format) < myString) and (myDate < to_date(myStrin g, format)).
ex. Select * from myTable where (to_char(fieldD ate, 'MM/DD/YYY') <= queryDate )
or Select * from myTable where (fieldDate <= to_date(queryDa te, 'MM/DD/YYYY') )
assuming fieldDate is a date or timestamp field and queryDate is '01/01/2007', a string.
Also, does it matter if the to_date or to_char condition is listed before or after the string variable? Thank you for your help.