Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: NEW: QueryPlanLogger for DB2 #3144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rPraml
Copy link
Contributor

@rPraml rPraml commented Aug 8, 2023

This adds a queryPlanLogger for DB2. The reported query-plan is based on this script: http://use-the-index-luke.com/s/last_explained

To generate query-plans, DB2 needs do have explain tables generated with CALL SYSPROC.SYSINSTALLOBJECTS( 'EXPLAIN', 'C' , '', ${SCHEMA})

By default, the selected schema is CURRENT USER. Depending on your DB2 setup, you can control this generation by an additional queryPlan.options config-parameter.
Examples:

  • ebean.db.queryPlan.options=create=false do not create the explain tables
  • ebean.db.queryPlan.options=create=true;schema=SYSTOOLS create the explain tables in the SYSTOOLS schema

rPraml added a commit to FOCONIS/ebean that referenced this pull request Aug 10, 2023
@rbygrave
Copy link
Member

I think we need to have a service loading mechanism to load QueryPlanLogger / QueryPlanLoggerFactory ... such that this code can move into the ebean-db2 module instead of being in ebean-core.

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.

2 participants