Reputation: 181
I am using Teradata. In that I am getting 'no more spool space in Database'. My database utilization is 85%. Is there any relationship between this error and DB utilization factor ? Any studies on this would be more helpful for me to resolve this. Share me your ideas to avoid this.
Upvotes: 15
Views: 130096
Reputation: 10357
Eventually, you might create too low spool space.
You need to specify a new value for SPOOL in a MODIFY PROFILE or MODIFY USER statement, depending on where the user spool is defined. The syntax is:
MODIFY [PROFILE profile_name | USER user_name ] AS SPOOL = 100000000 bytes ;
Upvotes: 0
Reputation: 66
Spool space can occur when you use tables having large data. If you are using multiple tables, check if you are using alias names instead of referring the complete table. Using alias names actually narrows down the data by the joins. Also see if functions like oreplace which consume more data are being used. Try using regular expressions in that case.
Upvotes: 1
Reputation: 21
I was not able to resolve my "out of spool" error by the methods above. I resolved the error by moving a rank function into its own small table without any join or extraneous columns.
Upvotes: 2
Reputation: 9618
Spool space
problems occur either when you have an inefficient query or when statistics
have not been properly collected on the tables you are using. It can also happen with tables where the primary index was poorly chosen (high skew). Spool is an attribute of the user account you are using to connect to the Teradata environment; it is not really an attribute of the database itself.
The only way to know for certain is to look at the EXPLAIN
plan for your query.
If your query is inefficient, rewrite it. If statistics need to be collected or if the index needs to be altered, contact the DBA responsible for the tables you are using.
If there is a particular query that is giving you an "out of spool" error, update this question with the complete text of the query.
Upvotes: 10