James Glendinning wrote:
Is there any reason why the logic that drives the calc I've done should be unsuitable for the portal filtering criteria?
Yes. It's a complex unstored calculation that has to be evaluated for every related record. I suggest you change it to an auto-enter calculation, which can be indexed, and see what that does for you.
I hear you Mike, but how come when I'm changing the global fields with the unfiltered portal showing, the unstored calcs all refresh instantly, with no lag at all? Doesn't that imply that the dependancies are sufficiently simple to allow the portal-filtering to work ok too?
As an update on this, I seem to have resolved the issue, but I don't understand why:
I've now changed the formula driving the filtered portal to a non-let structured syntax:
(IsEmpty ( DailyComparisons::zg_ComparisonStartDate ) and IsEmpty ( DailyComparisons::zg_ComparisonEndDate ) ) or (DailyComparisons::Date_Comparison ≥ DailyComparisons::zg_ComparisonStartDate and DailyComparisons::Date_Comparison ≤ DailyComparisons::zg_ComparisonEndDate )
( IsEmpty ( m2y groupon_Filter::zg_StockSKUFilter ) or PatternCount ( DailyComparisons::M2YSKU ; m2y groupon_Filter::zg_StockSKUFilter ) )
( IsEmpty ( m2y groupon_Filter::zg_OnlyShowChangedBreakevenItems ) or DailyComparisons::zc_BreakevenChange = 1 )
And now it all seems to work perfectly?!
So I'm still interested in what the difference is between the two approaches. Any ideas?
In your original calculation, OnlyShowChangedBreakevenitems comes from the Globals_Filter table.
In the new one, it comes from m2y groupon_Filter.
Similarly, in the first calc you have Globals_Filter::zg_StockSKUFilter. In the second, you have m2y groupon_Filter::zg_StockSKUFilter.
Those are differences. Whether they matter or not, I don't know.
Hi Mike, well spotted, in actual fact, those TO names shouldn't make a difference, and I've found that I think the main performance crisis is down to the zc_BreakevenChange calculation, so I'm trying to make that a stored calc now. Thanks for all your help...