DBA Data[Home] [Help]

PROCEDURE: SYS.ODCIINDEXINFODUMP

Source


1 PROCEDURE ODCIIndexInfoDump(ia ODCIIndexInfo) IS
2   col NUMBER;
3 BEGIN
4   if ia is null then
5    dbms_output.put_line('ODCIIndexInfo is null');
6    return;
7   end if;
8 
9   dbms_output.put_line('ODCIIndexInfo');
10   dbms_output.put_line('Index owner : ' || ia.IndexSchema);
11   dbms_output.put_line('Index name : ' || ia.IndexName);
12   if (ia.IndexPartition IS NOT NULL) then
13     dbms_output.put_line('Index partition name : ' || ia.IndexPartition);
14   end if;
15   if (ia.IndexInfoFlags != 0) then
16     ODCIIndexInfoFlagsDump(ia.IndexInfoFlags);
17   end if;
18 
19   if (bitand(ia.IndexInfoFlags, ODCIConst.Parallel) = ODCIConst.Parallel) then
20     if (ia.IndexParaDegree < ODCIConst.DefaultDegree and
21         ia.IndexParaDegree > 0) then
22       dbms_output.put_line('Parallel degree : ' || ia.IndexParaDegree);
23     elsif ( ia.IndexParaDegree = ODCIConst.DefaultDegree) then
24       dbms_output.put_line('Parallel degree : DEFAULT');
25     end if;
26   end if;
27 
28   -- use first index column's table name as table name for index
29   -- (ok since all index columns  belong to same table)
30   dbms_output.put_line('Table owner : ' || ia.IndexCols(1).TableSchema);
31   dbms_output.put_line('Table name : ' || ia.IndexCols(1).TableName);
32   if (ia.IndexCols(1).TablePartition IS NOT NULL) then
33     dbms_output.put_line('Table partition name : ' ||
34                           ia.IndexCols(1).TablePartition);
35   end if;
36 
37   FOR col IN ia.IndexCols.FIRST..ia.IndexCols.LAST LOOP
38      dbms_output.put_line('Indexed column : '||
39                           ia.IndexCols(col).ColName);
40      dbms_output.put_line('Indexed column type :'||
41                           ia.IndexCols(col).ColTypeName);
42      dbms_output.put_line('Indexed column type schema:'||
43                           ia.IndexCols(col).ColTypeSchema);
44      if (ia.IndexCols(col).ColInfoFlags != 0) then
45        ODCIColInfoFlagsDump(ia.IndexCols(col).ColInfoFlags);
46      end if;
47      if (ia.IndexCols(col).OrderByPosition > 0) then
48       dbms_output.put_line('Indexed column position in order by: '||
49                            ia.IndexCols(col).OrderByPosition);
50      end if;
51   END LOOP;
52 
53   if (ia.IndexPartitionIden != 0) then
54     dbms_output.put_line('Index partition identifier : ' ||
55                             ia.IndexPartitionIden );
56   end if;
57 
58   if (ia.IndexPartitionTotal > 1) then
59     dbms_output.put_line('Index partition total : ' ||
60                            ia.IndexPartitionTotal);
61   end if;
62 END;