Friday, November 7, 2014

Oracle DB Optimization


Some info on the Optimizer, Optimizer Mode and the Cost Based Approach:  http://docs.oracle.com/cd/B28359_01/server.111/b28274/optimops.htm#PFGRF001

http://www.dba-oracle.com/art_otn_cbo.htm


SET LINESIZE 300


SELECT t.owner,

       t.table_name AS "Table Name",

       t.num_rows AS "Rows",

       t.avg_row_len AS "Avg Row Len",

       Trunc((t.blocks * p.value)/1024) AS "Size KB",

       to_char(t.last_analyzed,'DD/MM/YYYY HH24:MM:SS') AS "Last Analyzed"

FROM   dba_tables t,

       v$parameter p

WHERE t.owner like '%PROD'

AND   p.name = 'db_block_size'

ORDER by t.owner,t.last_analyzed desc,t.table_name

/

No comments:

Post a Comment