Re: Speeding up a cursor in Forms

From: Alex Filonov <afilonov_at_yahoo.com>
Date: 19 Jul 2002 11:23:05 -0700
Message-ID: <336da121.0207191023.43af63ea_at_posting.google.com>


Álvaro Palma Aste <queria_direccion_at_el.perla.invalid> wrote in message news:<ah4rpr$ec2$1_at_localhost.localdomain>...
> I´ve a Form which has a cursor declared as:
>
> cursor C_xxxx is
>
> select blabla
> .......
> from ....
> where <table.column> = <value returned from a procedure>
>
> This run really slow, but if I remove the procedure call it
> executes almost instantly. I´ve though in the solution:
>
> cursor C_xxx(parameter = value returned by the procedure) is
>
> .....
> where <table.column> = parameter
>

When you mention <value returned from a procedure> you really mean call to a stored function, right? In this case the answer is obvious: in first case Oracle calls function for every retrieved row, in the second function is called only once. SQL queries with stored function calls are usually running very slow.

> but my doubt is:
>
> Does somebody knows any better solution, like making indexes
> inside the procedure (already done without any significant
> effect) or other?
>
> Thanks a lot for your patience and attention
>
> --
> Atte.
> Álvaro Palma Aste
> Grupo de Ing. Biomédica
> Depto. de Ing. Eléctrica - U. de Chile
> ******************************************************
> It's the only form of protest they're allowed
> I've seen their silent faces scream so loud
> If they were to speak these words they'd go missing too
> Another woman on a torture table what else can they do
>
> Sting - They Dance Alone...
Received on Fri Jul 19 2002 - 20:23:05 CEST

Original text of this message