-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: fix edge case causing suboptimal generic query plans
This commit fixes a bug that caused suboptimal generic query plans to be planned under all of the following conditions: 1. `plan_cache_mode` was set to `force_custom_plan` (the default). 2. A query was prepared and an ideal generic query plan was selected (i.e., it used the placeholder fast path). 3. New stats were collected, making the original plan stale and increasing the estimated row count of the root expression beyond `maxRowCountForPlaceholderFastPath` (10). 4. The prepared query was re-executed. Fixes #135151 There is no release note because this bug does not exist in any releases. Release note: None
- Loading branch information
Showing
2 changed files
with
114 additions
and
10 deletions.
There are no files selected for viewing
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