create a global temporary table with primary key
Hi all,
I hope that someone in this forum can help me to decide if the following is a bug or not.
In oracle 10.2.0.4.0 for SPARC (update 4) I have created a GTT:
CREATE GLOBAL TEMPORARY TABLE temp_tab1 (cnt, type primary key) ON COMMIT preserve rows AS
SELECT count(*), object_type FROM all_objects GROUP BY object_type;
Everything with this seems fine and executes perfectly well, but when you try to access the tables rows via the primary key index you will get no rows selected:
select /*+ INDEX(a) */ type from temp_tab1 a; --this returns no rows
Is it a bug that the index used to enforce the primary key is "VALID", but empty??
In oracle 10.2.0.4.0 for SPARC (update 4) I have created a GTT:
CREATE GLOBAL TEMPORARY TABLE temp_tab1 (cnt, type primary key) ON COMMIT preserve rows AS
SELECT count(*), object_type FROM all_objects GROUP BY object_type;
Everything with this seems fine and executes perfectly well, but when you try to access the tables rows via the primary key index you will get no rows selected:
select /*+ INDEX(a) */ type from temp_tab1 a; --this returns no rows
Is it a bug that the index used to enforce the primary key is "VALID", but empty??
1