Skip to content

Fix #2429: Replaced slow UNION query with optimized all_objects query#2467

Open
LohithaNadimpalli wants to merge 1 commit intorsim:masterfrom
LohithaNadimpalli:fix-slow-query-2429
Open

Fix #2429: Replaced slow UNION query with optimized all_objects query#2467
LohithaNadimpalli wants to merge 1 commit intorsim:masterfrom
LohithaNadimpalli:fix-slow-query-2429

Conversation

@LohithaNadimpalli
Copy link
Copy Markdown

Summary:

Replaced the slow UNION-based SQL query in connection.rb with a single query using all_objects to improve performance, as discussed in #2429.

Details:

  • Reduced 4 UNION ALL queries into one optimized query using all_objects.
  • Suggested by Oracle DBAs due to 2-second delay in production.
  • I'm a beginner contributor and wasn’t able to run tests locally.
    Kindly review and let me know if further changes are needed.

Closes #2429

@LohithaNadimpalli
Copy link
Copy Markdown
Author

Hi maintainers! I'm a beginner contributor and excited to make my first PR to this project. Please let me know if anything needs improvement. 🙏

@matthewtusker
Copy link
Copy Markdown

We've done some more research into this and found a DBMS_UTILITY.NAME_RESOLVE function in Oracle which resolves names, and supports db links. It's much faster than the existing SQL, and faster than the all_objects query. I think you should look into that if you're looking to make a contribution to Oracle Enhanced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slow query, can it be replaced?

3 participants