PB when passing dates in my input params (HELP !)

From: FJ <franck_jeff_at_hotmail.com>
Date: 26 Mar 2003 14:29:06 -0800
Message-ID: <c9bdc2f0.0303261429.87d8443_at_posting.google.com>



Hi guys
I do have a stored proc, with a simple select containing few joins. and in my conditions I have something like:

where DCREATED >= dfrom
and t.DCREATED < dto

if dfrom and dto are taken in the SP input parameters, the execution would take 8 sec.
And if I put the dates in hard in the proc like:

where DCREATED >= '01-JAN-2000'
and t.DCREATED < '20-MAR-2003'

It takes 0.5 sec.

I thought about maybe a precompilation prob, but even if in the procedure I declare 2 dates variables, and then affect some date values in hard like :

Declare
dto date;
dfrom date;
begin
dto := '20-MAR-2003' ;
dfrom := '01-JAN-2000' ;

select ...
where
and t.DCREATED >= dFrom
and t.DCREATED < dTo

It would take 8 secs.
Do any of you have an idea ? Thanks Received on Wed Mar 26 2003 - 23:29:06 CET

Original text of this message