Last active
August 28, 2023 01:31
-
-
Save mcsee/22deb44d4e95b4a3ca8ce9ba18d0f908 to your computer and use it in GitHub Desktop.
This file contains 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
<? | |
final class DatabaseQueryOptimizer { | |
public function selectWithCriteria($tableName, $criteria) { | |
// Make some optimizations manipulating criteria | |
} | |
private function sqlParserOptimization(SQLSentence $sqlSentence) | |
: SQLSentence { | |
// Parse the SQL converting it to a string | |
// and then working with their nodes as strings and lots of regex | |
// This was a very costly operation overcoming real SQL benefits. | |
// But since you made too much work you decide to keep the code. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment