|
|
Archives of the TeradataForum
Message Posted: Tue, 15 Jan 2002 @ 07:52:55 GMT
Subj: | | Re: SQL Tuning - Spool Space Problem |
|
From: | | Carmen Hofmann |
I think the only problem is the DISTINCT-expression. We generally don't use DISTINCT because of spool problems. Try to replace it by a
GROUP-BY-clause in combination with a derived table:
select count(*) from
(select a.ban
from jq8274.bill_charge a, jq8274.bill_adjustment b, jq8274.tax c
where a.ban = b.ban
and a.ban = c.ban
group by a.ban) derived (aban)
;
Hope that helps, Carmen.
| |