Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
void TABLE::initialize_quick_structures()
|
{
|
bzero(quick_rows, sizeof(quick_rows));
|
bzero(quick_key_parts, sizeof(quick_key_parts));
|
bzero(quick_costs, sizeof(quick_costs));
|
bzero(quick_n_ranges, sizeof(quick_n_ranges));
|
}
|
1. These members consume 1536 of 3520 bytes (44%) of TABLE for no good reason.
2. I doubt these arrays have to be fully initialized. I'd say they have to be initialized up to the number of indexes in the table.
3. Assuming these are per-key variables, they should be part of something like KEY rather than something like TABLE.
4. I generally recommend not using pre-initialization for performance reasons, but also because it tends to hide bugs from uninit-var detectors.
Attachments
Issue Links
- is caused by
-
MDEV-20519 Query plan regression with optimizer_use_condition_selectivity > 1
- Closed