Spool or CPU usage

Database
Enthusiast

Spool or CPU usage

Hi!

Now I'm optimizing SQL queries and have a question - what is better: to decrease Spool Usage or to decrease CPU Usage(if they can not be decreased together) ?

Some additional data:

TotalCPUTime/SpoolUsage before optimization: 4.5/300Mb

TotalCPUTime/SpoolUsage after optimization: 9.00/1.5Mb

Queries are the same excepting some minimal changes.

Thanks.

Regards,

Sergey
1 REPLY
Teradata Employee

Re: Spool or CPU usage

Hello,

In my opinion, if this query is not to be executed at peak-times, lowering spool usage will lower the overall time considerably.

But, it primarily depends on your preferences, usage and system load!

HTH!

Regards,

Adeel