Skip to content

Instantly share code, notes, and snippets.

@spetrunia
Created December 7, 2022 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spetrunia/6f73ecf6c49e972cb8630d7446c59a61 to your computer and use it in GitHub Desktop.
Save spetrunia/6f73ecf6c49e972cb8630d7446c59a61 to your computer and use it in GitHub Desktop.
The code used to be:
if ( s->quick->get_type() == QUICK_SELECT_I::QS_TYPE_RANGE)
{
...
if (filter)
{
...
}
type= JT_RANGE;
}
else // spetrunia: that is: s->quick->get_type() != QUICK_SELECT_I::QS_TYPE_RANGE
{
type= JT_INDEX_MERGE;
After the patch, the code is:
if ( s->quick->get_type() == QUICK_SELECT_I::QS_TYPE_RANGE)
{
if (access_cost_factor > 0.0)
{
...
type= JT_RANGE;
}
// spetrunia: QUESTION: why do we not set type= JT_RANGE when s->quick->get_type()=INDEX_MERGE,
// but access_cost_factor <0?
}
else // spetrunia: that is: s->quick->get_type() != QUICK_SELECT_I::QS_TYPE_RANGE
{
type= JT_INDEX_MERGE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment