drop table tst1
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
create table tst1 as select level id, mod(level, 10) code from dual connect by level < 100000
Table created.
create index tst1_id_ix on tst1(id)
Index created.
begin
dbms_stats.gather_table_stats(user, 'tst1');
end;
ORA-20000: Unable to analyze TABLE "APEX_PUBLIC_USER"."TST1", insufficient privileges or does not exist ORA-06512: at "SYS.DBMS_STATS", line 39132 ORA-06512: at "SYS.DBMS_STATS", line 38409 ORA-06512: at "SYS.DBMS_STATS", line 38568 ORA-06512: at "SYS.DBMS_STATS", line 39114 ORA-06512: at line 2 ORA-06512: at "SYS.DBMS_SQL", line 1721More Details: https://docs.oracle.com/error-help/db/ora-20000
create or replace view tst1_vw as
select
id,
code,
'5' code_ex
from
tst1
where
code = '5'
union all
select
id,
code,
'6'
from
tst1
where
code = '6'
View created.
select /*+gather_plan_statistics */ * from tst1_vw where id = 600
no data found
select /*+gather_plan_statistics */ * from tst1_vw where id = (select id from tst1 where id = 600 )
no data found
select /*+gather_plan_statistics */ * from tst1_vw t1 join (select id from tst1 where id = 600 ) t2 on t1.id = t2.id
no data found
select * from table(
dbms_xplan.display_cursor(null, null, 'BASIC +PREDICATE +ROWSTATS +COST ')
)
PLAN_TABLE_OUTPUT | User has no SELECT privilege on V$SESSION |
---|