-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query Plan Analysis: Reduce default numberOfRowsNotRequiringIndex to 0 (
#388) * Reduce DEFAULT_SMALL_TABLE_THRESHOLD to 0 * fix * cs * Update RuntimeConfiguration.php * record Co-authored-by: Markus Staab <m.staab@complex-it.de>
- Loading branch information
Showing
10 changed files
with
679 additions
and
126 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace staabm\PHPStanDba\Analyzer; | ||
|
||
final class QueryPlanAnalyzer | ||
{ | ||
/** | ||
* number of unindexed reads allowed before a query is considered inefficient. | ||
*/ | ||
public const DEFAULT_UNINDEXED_READS_THRESHOLD = 100000; | ||
/** | ||
* allows analyzing queries even on empty database schemas. | ||
*/ | ||
public const TABLES_WITHOUT_DATA = 0; | ||
/** | ||
* max number of rows in a table, for which we don't report errors, because using a index/table-scan wouldn't improve performance. | ||
* requires production quality data in the database at analysis time. | ||
*/ | ||
public const DEFAULT_SMALL_TABLE_THRESHOLD = 5000; | ||
} |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.