Listing 5: Creating the Statistics Tables

SQL> create table run_stats ( runid varchar2(15), name varchar2(80), value int );
Table created.

SQL> create or replace view stats
  2  as select 'STAT...' || a.name name, b.value

  3        from v$statname a, v$mystat b
  4       where a.statistic# = b.statistic#
  5      union all
  6      select 'LATCH.' || name,  gets
  7        from v$latch;
View created.


SQL> create table t ( x int );
Table created.


<pre>


</td></tr></table>






</td></tr>
<tr>
<td>
                              
 
                                                              
</td></tr>
</table></td>
</tr>
</table>
<table><tr>
<td><div><table>
<tr><td><div><div>
<table>
<tr>
<td>
<table><tr>
<td>
                              
                                 
                              
</td></tr>
</table></td>
<td>
<table><tr>
<td>
                              
<table><tr><td>
                              

                               
                                  
                                
                              
E-mail this page
</td>
</tr><tr><td>
                              

                               
                                 Printer View
                                
                              
Printer 
View 
</td></tr></table>
</td></tr>
</table><table><tr>
<td>
                              
 
                                
                              <div>
                              </div>
        <table>
                        <tbody><tr>
                                <td>
                                 
                              
                                 Software. Hardware. Complete.
                              </td>
                                
      <td>
                              
About 
        Oracle  
                              
|  
                              
Oracle and Sun
                              
|  
                              
                                 Oracle RSS Feeds
                               
         
                              
|  
                              
Careers  
                              
|  
                              
Contact 
        Us  
                              
|  
                              
Site Maps  
                              
|  
                              
Legal 
        Notices  
                              
|  
                              
Terms of Use  
                              
|  
                              
Privacy</td>
                        </tr>
                        <tr><td>
</td></tr>
        </tbody></table>
        
         
                              
        
 
                              

                               

                               


 
                              
 
                              
                               


 
                              

</td></tr>
</table></td>
<td>
<table><tr>
<td>
                              
                                 
                              
</td></tr>
</table></td>
</tr>
</table>
</div>
</div></td></tr>
</table>
</div></td></tr>
</table><table><tr>
<td>
                              
                                 
                              
</td></tr>
</table><table><tr>
<td>
<meta>
<meta>
<meta>


</td></tr>
</table></td>
<td>
<table><tr>
<td>  
                              

</td></tr>
</table></td>
</tr>
</table>
 
                              
</body>