I have a detailed question about whether to keep the calculation as part of a chart or to allow the Load statement of my script to do the heavy lifting. The current process is I have a script that looks like the following:
LOAD Text(AcctNum) as AcctNum,
Makedate(year(CreatedOnDate),month(CreatedOnDate),day(CreatedOnDate)) as CreateDate,
Year(CreatedOnDate) as WOYear,
Month(CreatedOnDate) as WOMonth,
ActualCompletionDate - CreatedOnDate as AgeofWO,
Group by AcctNum|PurposeID, AcctNumUserName,PMScheduleAttached,AgeofWO, WOYear, WOMonth, PriorityID, CraftID, StatusID, AcctNum;
Drop Table WorkOrders;
From there I create a chart that has the following four calculations on it:
I think what you posted is not your actual script. The WorkOrderSummaryCounts loads a field AcctNum|PurposeID that doesn't seem to exist in WorkOrders. Also you have a group by clause, but no aggregation function.
If WorkOrders and WorkOrderSummaryCounts have a lot of field names in common you will get a synthetic key. That could be one reason for the increase in file size. You could consider concatenating the summary table to the WorkOrders table. Something like:
Load *, 'detail' as RecordType from ....
Load X,Y,Z, count(Q) as CountQ, 'summary' as RecordType