xoxomos
asked on
DBMS_COMPRESSION SAMPLE
Anybody know where there is example of dbms_compression?
Need example that shows non partitioned table.
Need example that shows non partitioned table.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I believe this is what I'm looking for. In my case i'm trying to find an example of how to set
this up for non-partitioned table.
set serveroutput on
declare
v_blkcnt_cmp pls_integer;
v_blkcnt_uncmp pls_integer;
v_row_cmp pls_integer;
v_row_uncmp pls_integer;
v_cmp_ratio number;
v_comptype_str varchar2(60);
begin
dbms_compression.get_compr ession_rat io(
scratchtbsname => upper('&ScratchTBS'),
ownname => user,
tabname => upper('&TableName'),
partname => NULL,
comptype => dbms_compression.comp_for_ query_high ,
blkcnt_cmp => v_blkcnt_cmp,
blkcnt_uncmp => v_blkcnt_uncmp,
row_cmp => v_row_cmp,
row_uncmp => v_row_uncmp,
cmp_ratio => v_cmp_ratio,
comptype_str => v_comptype_str, subset_numrows=>&num_rows );
dbms_output.put_line('Esti mated Compression Ratio: '||to_char(v_cmp_ratio));
dbms_output.put_line('Bloc ks used by compressed sample: '||to_char(v_blkcnt_cmp));
dbms_output.put_line('Bloc ks used by uncompressed sample: '||to_char(v_blkcnt_uncmp) );
end;
/
this up for non-partitioned table.
set serveroutput on
declare
v_blkcnt_cmp pls_integer;
v_blkcnt_uncmp pls_integer;
v_row_cmp pls_integer;
v_row_uncmp pls_integer;
v_cmp_ratio number;
v_comptype_str varchar2(60);
begin
dbms_compression.get_compr
scratchtbsname => upper('&ScratchTBS'),
ownname => user,
tabname => upper('&TableName'),
partname => NULL,
comptype => dbms_compression.comp_for_
blkcnt_cmp => v_blkcnt_cmp,
blkcnt_uncmp => v_blkcnt_uncmp,
row_cmp => v_row_cmp,
row_uncmp => v_row_uncmp,
cmp_ratio => v_cmp_ratio,
comptype_str => v_comptype_str, subset_numrows=>&num_rows );
dbms_output.put_line('Esti
dbms_output.put_line('Bloc
dbms_output.put_line('Bloc
end;
/
ASKER
Tried it again, for some reason this time did not ask about partition name. Still running.
>>for some reason this time did not ask about partition nam
Then you must have had the partname parameter in the original script you ran?
Then you must have had the partname parameter in the original script you ran?
ASKER
Scratch table too small. Bombed after three hours. Start from scratch.
Thanx for the docs and sample. That's the same sample i picked:-)
Will try digesting the docs in the morning
Thanx for the docs and sample. That's the same sample i picked:-)
Will try digesting the docs in the morning
ASKER
markgeer, it came with 11.2 and 12. I think it was dbms_comp_advisor before 11.2
ASKER
Finished. Now to get a script that will execute dbms_compression once for each partition.
ASKER
Thanx
Or are you asking specifically about something named "dbms_compression" in Oracle? I don't recognize that name.