|
|
Archives of the TeradataForum
Message Posted: Wed, 30 Jul 2003 @ 21:25:47 GMT
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
| |