Re: POC, WIP: OR-clause support for indexes
| От | jian he |
|---|---|
| Тема | Re: POC, WIP: OR-clause support for indexes |
| Дата | |
| Msg-id | CACJufxGz4xgb0=J3EG0fdPW_qc1qg2shXBQBpacCTa-4w4iosw@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: POC, WIP: OR-clause support for indexes (Alexander Korotkov <aekorotkov@gmail.com>) |
| Ответы |
Re: POC, WIP: OR-clause support for indexes
Re: POC, WIP: OR-clause support for indexes |
| Список | pgsql-hackers |
assume v40 is the latest version.
in group_similar_or_args
we can add a bool variable so
bool matched = false;
foreach(lc, orargs)
{
if (match_index_to_operand(nonConstExpr, colnum, index))
{
matches[i].indexnum = indexnum;
matches[i].colnum = colnum;
matches[i].opno = opno;
matches[i].inputcollid = clause->inputcollid;
matched = true;
break;
}
}
...
if (!matched)
return orargs;
/* Sort clauses to make similar clauses go together */
qsort(matches, n, sizeof(OrArgIndexMatch), or_arg_index_match_cmp);
....
I guess it can save some cycles?
В списке pgsql-hackers по дате отправления: