Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL query optimization tips

User_1871May 24 2022 — edited May 24 2022

Does anyone have any SQL optimization tips they can share?
For example, I learned recently that the cost of SDO_GEOMETRY functions doesn’t usually get included in the explain plan cost (at least not functions in the SELECT clause). I had a query that used a bunch of nested SDO_GEOMETRY functions in the SELECT clause that was slow, yet the explain plan cost was surprisingly small. It took me a while to realize that Oracle doesn’t usually include the cost of functions in the explain plan cost.
Related, although not specific to spatial queries: https://stackoverflow.com/questions/66671812/are-functions-considered-in-execution-plan
Any other optimization tips come to mind?

Comments
Post Details
Added on May 24 2022
0 comments
97 views