Re: problem in to_date function

From: Nic <nicpayre[junk]_at_sympatico.ca>
Date: Mon, 25 Aug 2003 15:15:29 -0700
Message-ID: <Fft2b.2935$Cg2.348402_at_news20.bellglobal.com>


Hi,
for part of your question related to the performance, i think you could modify your query to get

select * from c_table where n_date = to_date('21/08/03','DD/MM/YY');

so the to_date function get call only once, of course if you have store the date data with differents time you still will need to call the trunc function.

select * from c_table where trunc(n_date) = to_date('21/08/03','DD/MM/YY');

"KULJEET" <kuljeet_twtpl_at_hotmail.com> wrote in message news:febbed51.0308222045.3f3b3845_at_posting.google.com...
> hi
> i have a table c_table with two columns
> no,
> date
> it contains records
>
> no n_date
> 1 10-AUG-03
> 2 21-AUG-03
>
> when we issue
> select * from c_table where n_date='10-AUG-03';
> it will successfully return the record
>
> but when we give
> select * from c_table where n_date='21-AUG-03';
>
> it will not return the record
>
> after using to_date function like
> select * from c_table where to_date(n_date,'DD/MM/YY')='21/08/03';
>
> it will successfully return the records
> but the main problem is that
> when we have table that contains 50,000,00 records
> **and then using to_date function then it will slow down the performance
>
> how we can solve the.
Received on Tue Aug 26 2003 - 00:15:29 CEST

Original text of this message