performance improvment
I do the following to add minutes according to input parameters
but when users call this function many times Oracle sometime hang, table
is with 5 records only
do you have any idea how to improve it?
thanks
function add_minutes(in_date in date, in_minutes in number) return date is
Result date;
tmp_date date;
begin
tmp_date := in_date + (in_minutes / 1440);
begin
for i in (select *
from wiz_idt
where delta_hours > 0 and in_date < idt_date and tmp_date >= idt_date or
delta_hours > 0 and in_date > idt_date and tmp_date <= idt_date or
delta_hours < 0 and in_date < idt_date and tmp_date >= idt_date or