Skip to content

Conversation

cezmunsta
Copy link

@cezmunsta cezmunsta commented Nov 29, 2022

The query introduced with prometheus#523 performs poorly when there are sufficient numbers of columns in information_schema.columns.

  • Added using the table_schema as a filter
  • Added limit to the query

PMM-11082
SUBMODULE-2924

Upstream PR

The query introduced with
prometheus#523 performs poorly when there are sufficient
numbers of columns in information_schema.columns.

* Added using the table_schema as a filter
* Added limit to the query
@cezmunsta cezmunsta self-assigned this Nov 29, 2022
@cezmunsta cezmunsta requested a review from a team as a code owner November 29, 2022 13:10
@cezmunsta cezmunsta requested review from floatinginbits and tshcherban and removed request for a team November 29, 2022 13:10
@it-percona-cla
Copy link

it-percona-cla commented Nov 29, 2022

CLA assistant check
All committers have signed the CLA.

Comment on lines +34 to +37
WHERE table_schema = 'information_schema'
AND table_name = 'INNODB_METRICS'
AND column_name IN ('status', 'enabled')
LIMIT 1
Copy link

@ritbl ritbl Dec 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks as a workaround. I think for future us, we need at least document reasons for this change.
Here are a few points that are not clear:
1: why LIMIT 1?
2: it looks like schema was changed. this check for table_schema is the same across all supported version?

@BupycHuk BupycHuk merged commit 3040333 into main Dec 5, 2022
@BupycHuk BupycHuk deleted the PMM-11082 branch December 5, 2022 16:54
denisok pushed a commit that referenced this pull request Dec 6, 2022
…106)

The query introduced with
prometheus#523 performs poorly when there are sufficient
numbers of columns in information_schema.columns.

* Added using the table_schema as a filter
* Added limit to the query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants