MODEL Performance Tuning


Run the code on this page in SQL*Plus to create the sample tables, data, etc. used by the examples in this section.

Be sure to read Using SQL Snippets ™ before executing any of these setup steps.

create table t_1k
  key  integer primary key,
  key2 varchar2(10) ,
  m_1  varchar2(4000) ,
  m_2  varchar2(4000)
) ;

  for i in 1 .. 1000 loop
    insert into t_1k values ( i, to_char(i), 'a', 'b' );
  end loop;

create table t_100k
  key   number primary key,
  key_1 char(100) ,
  key_2 char(100) ,
  key_3 char(100) ,
  m_1   varchar2(1000)
) ;

  for i in 0 .. 99999 loop
    insert into t_100k values
    ( i,
      to_char( mod(i-1,1000) + 1 ),
      to_char( trunc(i,-3) ),
  end loop;

execute dbms_stats.gather_schema_stats( ownname => null )

column key_1 format a5 truncate
column key_2 format a5 truncate
column key_3 format a5 truncate

column m_1 format a3
column m_2 format a3
column m_3 format a3

Linking to SQL Snippets ™

To link to this page in Oracle Technology Network Forums or OraFAQ Forums cut and paste this code.

  • [url=]SQL Snippets: MODEL Performance Tuning - Setup[/url]

To link to this page in HTML documents or Blogger comments cut and paste this code.

  • <a href="">SQL Snippets: MODEL Performance Tuning - Setup</a>

To link to this page in other web sites use the following values.

  • Link Text : SQL Snippets: MODEL Performance Tuning - Setup
  • URL (href):