Skip to content

Instantly share code, notes, and snippets.

@ejhayes
Created August 13, 2010 15:59
Show Gist options
  • Save ejhayes/523111 to your computer and use it in GitHub Desktop.
Save ejhayes/523111 to your computer and use it in GitHub Desktop.
set serveroutput on;
declare
l_num_rows number;
l_num_bytes number;
l_stmt varchar2(2000);
begin
l_stmt := 'select well, study, conc, mdl, rpt_yr from wellinv.widata where rpt_yr > 1998';
dbms_mview.estimate_mview_size
(
stmt_id => 'Est1',
select_clause => l_stmt,
num_rows => l_num_rows,
num_bytes => l_num_bytes
);
dbms_output.put_line('Number of rows = '||l_num_rows);
dbms_output.put_line('Size (bytes) = '||l_num_bytes);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment