Sales details are being stored on a daily basis in the SALES_2007 table. A large amount of
data is added to the table daily. To save disk space, you issued the following command:
ALTER TABLE sales_2007 COMPRESS FOR ALL OPERATIONS;
What would be the outcome of this command?
A.
It produces an error because data already exists in the table.
B.
It produces an error because compression can be enabled at table creation only.
C.
It compresses all data added or modified henceforth but the existing data in the table is
not compressed immediately.
D.
It immediately compresses all existing data as well as new data, resulting from either
fresh additions or modifications to existing data.
Funny that, the doc
http://oracle.su/docs/11g/server.112/e10592/statements_7002.htm
states that ….
In earlier releases, OLTP table compression was enabled using COMPRESS FOR ALL OPERATIONS. This syntax has been deprecated.
Funny that!!
Change
COMPRESS FOR ALL OPERATIONS
for
COMPRESS FOR OLTP
and I would agree with the answer D
COMPRESS FOR ALL OPERATIONS was valid in 11gR1 and changed into COMPRESS FOR OLTP in 11gR2.
With the information at:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_7002.htm#i2128733
I think the answer is still C. It doesn’t say anything that existing data will compressed immediately.
Obviously not everything is compressed anyway, an interesting article:
https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9531740500346878035