Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Oracle UDFs are exceptionally expensive #4810

Open
sebastian opened this issue Nov 5, 2020 · 3 comments
Open

Oracle UDFs are exceptionally expensive #4810

sebastian opened this issue Nov 5, 2020 · 3 comments

Comments

@sebastian
Copy link
Member

Telefonica testing tells us that there is 1/2 - 2/3 added overhead to query execution when running queries that trigger the UDFs.

Is there a way to improve the performance of the UDF functionality? Could the UDF functionality be inlined into the queries themselves instead, rather than requiring the invocation of actual UDFs defined on the level of the database?

@cristianberneanu
Copy link
Member

There is no way to do exception handling inline. We need UDFs for that.
The only workaround (in some cases) would be to enable bounds computations.
If they do that, they would also benefit from #4549.

Maybe we could add an option to only execute analysis queries at night so that they don't mind them as much?

@sebastian
Copy link
Member Author

Yeah, I told them to enable the bounds analysis. Let's hope they get around to it, and it doesn't end up too expensive on their Oracle DB.

@gampleman
Copy link
Contributor

Could we implement them in Java instead? I read somewhere (can't find the source) that PL/SQL is an order of magnitude slower than native implementations.

The other interesting this I found is: http://stevenfeuersteinonplsql.blogspot.com/2017/03/speed-up-execution-of-your-functions.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants