JohnSilver182
BANNED | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Юзаю сабж давно но удивляюсь его дикому оптимизатору Код: select * from aptdrugpresent where scode in (10432) | Цитата: Plan PLAN (APTDRUGPRESENT INDEX (ADP_ADP)) ------ Performance info ------ Prepare time = 0ms Execute time = 31ms Avg fetch time = 2,58 ms Current memory = 9 449 016 Max memory = 10 252 776 Memory buffers = 2 048 Reads from disk to cache = 9 Writes from cache to disk = 0 Fetches from cache = 1 884 | Далее , подзапрос возвращает ОДНО значение , Но ТОРМОЗА !! Код: select * from aptdrugpresent where scode in (select ap.apt_code from apt_priv ap ) | Цитата: Plan PLAN (AP INDEX (PK_APT_PRIV)) PLAN (APTDRUGPRESENT NATURAL) Adapted Plan PLAN (AP INDEX (PK_APT_PRIV)) PLAN (APTDRUGPRESENT NATURAL) ------ Performance info ------ Prepare time = 0ms Execute time = 5s 422ms Avg fetch time = 451,83 ms Current memory = 9 445 924 Max memory = 10 252 776 Memory buffers = 2 048 Reads from disk to cache = 21 459 Writes from cache to disk = 586 Fetches from cache = 4 490 886 | |