Thursday, July 8, 2021
Table or Index Recommendation for reorg
set lines 300 pages 200
col INDEX_NAME for a25
col TABLE_NAME for a35
col INDEX_NAME for a30
SELECT UT.TABLE_NAME, UI.INDEX_NAME, US.BLOCKS AS "TABLE BLOCKS", UI.CLUSTERING_FACTOR AS "INDEX CLUSTERING FACTOR", UT.NUM_ROWS AS "TABLE ROWS",
TRUNC((UT.NUM_ROWS/UI.CLUSTERING_FACTOR)/(UT.NUM_ROWS/UT.BLOCKS),2) as CF
FROM USER_INDEXES UI,
USER_TABLES UT,
USER_CONSTRAINTS UC,
USER_SEGMENTS US
WHERE UI.TABLE_NAME = UT.TABLE_NAME
AND UT.TABLE_NAME = UC.TABLE_NAME
AND UI.INDEX_NAME = UC.INDEX_NAME
AND UT.TABLE_NAME = US.SEGMENT_NAME
AND US.SEGMENT_TYPE = 'TABLE'
AND UC.CONSTRAINT_TYPE = 'P'
AND UI.CLUSTERING_FACTOR > 0
AND UT.BLOCKS > 0
AND UT.NUM_ROWS > 0
AND TRUNC((UT.NUM_ROWS/UI.CLUSTERING_FACTOR)/(UT.NUM_ROWS/UT.BLOCKS),2) < 0.75
and UT.TABLE_NAME not like '%RDF%'
ORDER BY CF;
set lines 300 pages 200
col INDEX_NAME for a25
col TABLE_NAME for a15
SELECT UT.TABLE_NAME, UI.INDEX_NAME, US.BLOCKS AS "TABLE BLOCKS", UI.CLUSTERING_FACTOR AS "INDEX CLUSTERING FACTOR", UT.NUM_ROWS AS "TABLE ROWS",
TRUNC((UT.NUM_ROWS/UI.CLUSTERING_FACTOR)/(UT.NUM_ROWS/UT.BLOCKS),2) CF
FROM USER_INDEXES UI,
USER_TABLES UT,
USER_CONSTRAINTS UC,
USER_SEGMENTS US
WHERE UI.TABLE_NAME = UT.TABLE_NAME
AND UT.TABLE_NAME = UC.TABLE_NAME
AND UI.INDEX_NAME = UC.INDEX_NAME
AND UT.TABLE_NAME = US.SEGMENT_NAME
AND US.SEGMENT_TYPE = 'TABLE'
AND UC.CONSTRAINT_TYPE = 'P'
AND UT.TABLE_NAME IN ('SALES_DATA','MDP_MATRIX','ITEMS','T_EP_CTO_DATA','T_EP_CTO_MATRIX','GPS_OPPTY_DATA','GPS_OPPTY_DATES','GE_OPPTY','GE_OPPTY_MATRIX')
;
Subscribe to:
Post Comments (Atom)
Real estate builders fraud
actual carpet area 1000sft and common area 30% it should be 1300 but builder sell it as 1430 sft saying 30% common area. where as they a...
-
adcfgclone.pl Different Components There are different components with Rapid Clone that are used when cloning an Oracle Applications inst...
-
Creating an ACFS file system on OCI DB system In an DB system on OCI if we want to add any file system then we can use the ACFS file syste...
-
10 References This section lists the reference material that can be read to gain further knowledge in the various areas relevant to establi...
No comments:
Post a Comment