Remove execute() function call from TimeseriesDataset.php that runs a duplicate sql statements#2250
Open
eiffel777 wants to merge 2 commits into
Open
Remove execute() function call from TimeseriesDataset.php that runs a duplicate sql statements#2250eiffel777 wants to merge 2 commits into
eiffel777 wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
execute()removed in this PR caused the sql statement to be run a second time.$this->agg_query->getRawStatementdoes return a the statement but that function runsDB::factory($this->_db_profile)->query($query_string, $this->pdoparams, true);and that query function runs$stmt->execute($params)inclasses/CCR/DB/PDODB.phpline 159.Motivation and Context
Running the duplicate sql statement is unneeded and will make requests for data take longer. The performance aspect may not be as noticeable when the database query cache is enabled.
Tests performed
In docker, turn on slow log and set slow log to 0 to log all queries. Got to metric explorer and request any statistic. Look at slow log and make sure second group by query does not show up.
Checklist: