On some Oracle instances wrong order of result
On some of our Oracle instances the ordering of a result does not work properly when selecting from a partitioned table with local primary key.
Here a small example.
Table Creation
-- SQL*Plus: Release 11.2.0.4.0 Production
create table ORDER_TEST
(ID number(1)
,VAL number(1)
,constraint ORDER_TEST_PK
primary key (ID,VAL)
using index (create unique index ORDER_TEST_PK
on ORDER_TEST(ID,VAL)
local -- global: result is ordered correctly
)
enable
)
partition by range (ID)
interval(1)
(partition negative values less than (0))
;
insert into ORDER_TEST values (0,0) ;
insert into ORDER_TEST values (0,1) ;
commit ;
Data Selection
Please note the different ordering of the second result.