Re: External function and performance

From: Krzysztof Ku¶nierz <kkrzysiek_at_supra.com.pl>
Date: Sun, 24 Mar 2002 22:55:29 +0000
Message-ID: <a7li0v$jih$1_at_news.tpi.pl>


Thomas Kyte wrote:

>
> I do not observe 10x, I see a hit but not 10x
>

[Quoted] Right, I've checked it once again - 4 times, not 10 - my fault, sorry. But it is still much to slow.
Additionally, I noticed that external function used in WHERE clause works even worse.
For instance:

[Quoted] SELECT descr FROM table WHERE substr(descr,1,1)='N'

is much faster (more than 10 times and I belive it depends on number of rows)

[Quoted] SELECT descr FROM table WHERE check_example(descr)<>0

where check_example function just checks whether first leter of parameter value is 'N'.

> The code path is longer -- much so. You are going from SQL, outside to
> another process -- and back again.
>

Is there any way to write a function and make it perform as fast as built-in functions? Maybe Java?

I would appreciate any suggestion. Received on Sun Mar 24 2002 - 23:55:29 CET

Original text of this message