dmunozv04 opened a new pull request, #46010: URL: https://github.com/apache/superset/pull/46010
### SUMMARY Adds query cost estimation for Oracle databases in SQL Lab. Oracle runs `EXPLAIN PLAN FOR <query>`, then reads the root row from Oracle’s `PLAN_TABLE` to return estimated rows, optimizer cost, time, and bytes accessed. It removes the plan row created for the estimate. Oracle’s documentation: https://docs.oracle.com/en/database/oracle/oracle-database/26/tgsql/generating-and-displaying-execution-plans.html ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF AFTER: <img width="963" height="568" alt="Oracle query cost estimate" src="https://github.com/user-attachments/assets/9e9eab35-21f2-48b9-9a70-524ad6fcc3f9" /> ### TESTING INSTRUCTIONS - Locally tested with Oracle Database Free (multiple versions) using the testcontainer’s `gvenzl/oracle-free:slim` image on Docker. - To verify in SQL Lab, enable `ESTIMATE_QUERY_COST` and set `cost_estimate_enabled: true` in the Oracle connection’s `extra` settings. Run a query and request its cost estimate. The connection user needs access to `PLAN_TABLE` and permission to explain the query, including access to underlying objects used by views. - The Testcontainers test suite can be run to verify automatically. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [x] Required feature flags: `ESTIMATE_QUERY_COST` and per-connection setting `cost_estimate_enabled: true` - [x] Changes UI: translation files add Oracle to the supported query cost estimate list - [ ] Includes DB Migration - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [x] Introduces new feature or API - [ ] Removes existing feature or API I ran `generate-database-docs.mjs` which produced a big diff with a bunch of unrelated changes, let me know if I should exclude that change from this PR Locally the changed was verified on the following Oracle database versions: ``` "image, dbname", [ ("gvenzl/oracle-xe:11.2.0.2-slim-faststart", "XE"), ("gvenzl/oracle-xe:18.4.0-slim-faststart", "XEPDB1"), ("gvenzl/oracle-xe:21.3.0-slim-faststart", "XEPDB1"), ("gvenzl/oracle-free:23.26.3-slim-faststart", "FREEPDB1"), ], ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
