PL/SQL (MOSC)

MOSC Banner

performance improvment

edited Aug 26, 2018 5:09AM in PL/SQL (MOSC) 5 commentsAnswered

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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center