Fix performance issue in SQL fetching Oracle synonyms. all_objects Oracle view is slow to scan.
Update src/main/java/workbench/db/oracle/OracleSynonymReader.java #80
llzen44/workbench:master into master Fix performance issue in SQL fetching Oracle synonyms. all_objects Oracle view is slow to scan.
Hi
Some details about the use case.
Faced when using large number of WbCopy commands to copy tables from Oracle to Postgres. Each WbCopy triggers a filtered SELECT on all_synonyms/all_objects and takes ~15s (large servers, large number of objects and schemas).
Once tuned, this query takes ~20ms.
Thanks
Thanks. I am a bit surprised, that this is faster. I wouldn't have expected that.
I agree it is surprising.
The key change here in the SQL is "AND o.owner" to prevent the all_objects scan.
Testing shows that accessing some parts of the all_objects view by a non sys user is very slow...
Thanks for the pull (and for this fantastic tool)
Just a minor change: the condition has to be on s.owner otherwise the outer join is turned into an inner join.
I compared the execution plans on an Oracle 21 instance and could not see any difference. But then, my Oracle test instance only has very few synonyms, so this is probably not a real world example.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?