Доступ и предикаты Фильтра в плане выполнения Oracle

Я верю, делаете ли Вы просто

prop.SetValue(obj,null,null);

, Если это - valuetype, это установит его на значение по умолчанию, если это - ссылочный тип, это установит его в NULL.

9
задан skaffman 23 September 2009 в 07:45
поделиться

2 ответа

No, the access predicates in this example indicates that the index is being traversed by both DOMAIN_CODE and CURRENT_VERSION_IND.

I wouldn't worry about the filter predicate that appears to be redundant - it seems to be a quirk of explain plan, probably something to do with the fact that it has to do a sort of skip-scan on the index (it does a range scan on the first column, then a skip scan over CODE_VALUE, searching for any matching CURRENT_VERSION_INDs).

Whether you need to modify the index or create another index is another matter entirely.

Also, just to correct a minor misunderstanding: the blocks have to be fetched from the index BEFORE it can do anything, whether executing the "access" or "filter" steps. If you're referring to fetching blocks from the table, then also the answer is no - you said the filter predicate "10" was on the index access, not on a table access; and anyway, there's no reason Oracle can't evaluate the filter on CURRENT_VERSION_IND on the index - it doesn't need to access the table at all, unless it needs other columns not included in the index.

6
ответ дан 4 December 2019 в 22:28
поделиться

Я считаю, что вы правы в своей оценке того, что делает Oracle, но ошиблись сказать, что шаг фильтра (или любой другой выбор оптимизатора) всегда «зло». Нет смысла индексировать абсолютно все возможные комбинации столбцов, которые могут быть запрошены, поэтому часто требуется фильтрация.

Однако, если в этом случае добавление CURRENT_VERSION_IND в качестве второго столбца индекса значительно улучшает производительность при часто выполняемых запросах и не влияет на производительность других запросов, то это может иметь смысл .

2
ответ дан 4 December 2019 в 22:28
поделиться
Другие вопросы по тегам:

Похожие вопросы: