My Oracle Support Banner

ATOMIC_REFRESH=>FALSE Ignored When Mview Has Domain Index (Doc ID 1390665.1)

Last updated on MARCH 10, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

Goal

Materialized View refresh with CTXCAT index is slow, even after passing the parameter ATOMIC_REFRESH=FALSE and 10046 Trace shows DELETE statements instead of TRUNCATE. However, complete refresh after removing the CTXCAT index shows truncate statement.
Example showing ATOMIC_REFRESH=FALSE is not taking effect:
--Create Index Set
begin
ctx_ddl.create_index_set('test_iset');
ctx_ddl.add_index ('test_iset', 'object_type');
end;
/
PL/SQL procedure successfully completed.
--Create Mview
CREATE materialized view <mview name>
TABLESPACE <TS name>
AS
SELECT * FROM USER_OBJECTS;

Materialized view created.
--Create CTXCAT Index
CREATE INDEX  <index name>ON <mview name>
(OBJECT_NAME) INDEXTYPE IS CTXSYS.CTXCAT
PARAMETERS ('index set test_iset');

Index created.
--Mview Refresh
execute DBMS_MVIEW.REFRESH('<mview name>', ATOMIC_REFRESH=FALSE);

PL/SQL procedure successfully completed.
Verify from 10046 trace delete being used for above refresh statement
-- DELETE CTXCAT INDEX
DROP INDEX <index name>;
--Mview Refresh
execute DBMS_MVIEW.REFRESH('<mview name>', ATOMIC_REFRESH=>FALSE);
Verify from 10046 trace truncate being used for above refresh statement.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.