I found this filter which appears like it may be a part of a filter guide (I 
haven’t investigated).. If it turns out to be an unused filter, ignore this..

If not I think there is one additional query which is rather unnecessary in 
this.

The Filter Name is INT:AASFND:DAT:Site_Count_Q

There are two direct SQL’s in two set fields, where the result of the first is 
used in the second..
First Set Fields query:
SELECT schemaId FROM arschema WHERE name = 'AAS:Activity'

“T” + $1$ is set to $z1D_schemaID$

Second set fields query:
SELECT COUNT(C1)  FROM $z1D_schemaID$ WHERE C260000001 = '$Site$'

COUNT(C1) is then set to $z1D_RecordCount01$

If a direct SQL had to be used, couldn’t these two have been combined into a 
single SQL against the view of AAS:Activity instead?

SELECT COUNT(REQUEST_ID) FROM AAS_ACTIVITY WHERE SITE = $SITE$

would work just as well with just one set field to $z1D_RecordCount01$

I’m guessing this must be running on a mass data load, so possibly resulting in 
2 SQLs per record...

Again I have not found out where this filter is used yet, so I may be wrong 
about it being fired for every record imported.. But the point is even if it is 
running on a single record, it could have been better written against the view.

Joe

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

Reply via email to