Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 30 Jul 2003 @ 21:25:47 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Difference between Perm and Spool
 
From:   Christie, Jon

INSERT INTO DatabaseSpaceVTemp
SELECT DatabaseName,
       sum(maxperm) MAXPERM,   sum(currentperm) CURPERM,
       sum(peakperm) PEAKPERM,
       sum(maxspool) MAXSPOOL, sum(peakspool) PEAKSPOOL
FROM dbc.allspace
WHERE tablename = 'All'
GROUP BY databasename;

would better be coded:

INSERT INTO DatabaseSpaceVTemp
SELECT DatabaseName,
       sum(maxperm) MAXPERM,   sum(currentperm) CURPERM,
       sum(peakperm) PEAKPERM,
       sum(maxspool) MAXSPOOL, sum(peakspool) PEAKSPOOL
FROM dbc.diskspace
GROUP BY databasename;

The diskspace view has the equivalent of the (tablename = 'All') term inside the view. Why Teradata ever provided the allspace view is beyond me. Maybe they were covering up the fact that DBC.DatabaseSpace is really two logical tables sharing one physical table.

Jon



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023