0

I query a view that is built from 3 tables. The main tables are joined by a column that in table A it is indexed & in table B it is PK. The view has additional column that is used in the condition but it is not indexed. seems a simple query from the table is using the primary key but also accesses the table with table access full. I need an explanation as to why this happens & how to make it better. Tabc in the example code below is very small & therefore expected to be accessed full.

create or replace view v_per_pda
as select cola, colb, case when colc = 51 then colc else 0 end decd
from taba, tabb, tabc
where taba.id = tabb.id
and tabb.cold = 1
and taba.id2 = tabc.id2

in the explain plan below you can see : taba is accesses by index range scan & tabb is accesses by the primary key the table access full below relates to table b. why does oracle uses this?

enter image description here

Jon Heller
  • 34,999
  • 6
  • 74
  • 132

1 Answers1

0

I consulted a DBA & what the pl sql developer shows is adaptive explain plan after executing the explain plan using plan_table - you do not see the table access full. moreover, it is more accurate.

so thank you & this question is a closed issue