Вообщем уже больше 6 часов в административном модуле висит загрузка информации о ценах и артикулах. в dbconsole 100% ЦП есть запрос
insert into TTProdArticle(StoreLoc, ZoneID, Article, CalcNu) select S.StoreLoc, S.ZoneID, S.Article, :"SYS_B_0" from TTProdArticleSub S where not exists (select :"SYS_B_1" from FFProdInSpec A, FFProdOutSpec I where A.DocType=:"SYS_B_2" and A.StoreLoc= S.StoreLoc and A.ZoneID = S.ZoneID and A.Createdat <= to_date(:"SYS_B_3",:"SYS_B_4") and I.Createdat <= to_date(:"SYS_B_5",:"SYS_B_6") and A.Article = S.Article and A.NDoc = I.NDoc and not exists (select :"SYS_B_7" from TTProdArticle T where T.StoreLoc = I.StoreLoc and T.ZoneID = I.ZoneID and T.Article = I.Article))
SQL adviser порекомендовал собрать статистику по индексам "SUPERMAG"."FFCPRODINSPEC_PK"
"SUPERMAG"."FFCPRODINSPEC_PHYSPK"
таблицам
SUPERMAG"."TTPRODARTICLE
SUPERMAG"."TTPRODARTICLESUB"
что и было сделано.
Operation Line ID Object Object Type Rows Bytes Cost CPU Cost Predicate
Select to collapseINSERT STATEMENT
0
23,817
Select to collapseLOAD TABLE CONVENTIONAL
1
Select to collapseINDEX FULL SCAN
2 SUPERMAG.TTCPRODARTICLESUB_PK
652 33.746K 0
Select to collapseNESTED LOOPS
3
Select to collapseNESTED LOOPS
4
200,000,020 30.547G 2
Select to expandNESTED LOOPS ANTI
5
44 4.598K 2
INDEX RANGE SCAN
8 SUPERMAG.FFCPRODINSPEC_PHYSPK
4,545,455
0
TABLE ACCESS BY INDEX ROWID
9 SUPERMAG.FFPRODINSPEC
4,545,455 247.088M 0