I want steps to in Oracle Database to find whether Compression is happening or not on a particular table
CodePudding user response:
Please perform below steps:
First execute analyze on your table.
analyze table YOUR_TABLE_NAME compute statistics;
Execute below query to check the compression stats:
select b.name, b.subname, a.AVGROWSIZE_NC, a.AVGROWSIZE_C, a.NBLK_NC, a.NBLK_ADVANCED, a.NBLK_EHCC, a.NROWS_NC, a.NROWS_ADVANCED, a.NROWS_EHCC from sys.compression_stat$ a, sys.obj$ b where a.obj# = b.obj#;
Execute the compression on your table
Analyze your table again (same first step)
Execute the SELECT query.. same as step 2nd.