Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 21 Oct 2003 @ 15:31:45 GMT


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


Subj:   Re: Problem while giving select * against a table
 
From:   William Wash

When you do a SELECT * statement, the data from that table is inserted into a spool. So essentially you are copying that entire table into another table to retrieve from. If you have a large table, you are going to use an enormous amount of space to retrieve all the rows.

If it's a small table, then you might want to check with your DBA to see if you have enough spool space assigned.

If you are looking for a sample of the data, trying using criteria to narrow the results.

For example,

SELECT * FROM TABLENAME WHERE CUSTOMER = 'SMITH/JOHN';

OR

SELECT * FROM TABLENAME WHERE CUSTOMERNAME IN ('SMITH/JOHN','DOE/JOHN','MOUSE/MICKEY') AND CUSTOMERDATE > '2003-10-01';

This way the data is returned, but you have a much smaller sample, instead of the entire population.

Bill



     
  <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