> I'm finding that I routinely need to do in-memory aggregation of intermediate results in my stored procedures
Can you post an example/description of the types of queries/operations that require you to do this routinely?
"Routinely" is maybe an overstatement since I've only written a half-dozen or so stored procedures so far, but I'm definitely seeing this as a regular need in order to work around a couple of limitations in Volt's SQL subset.
First, the lack of self-joins. My use-case intrinsically requires a self-join which I understand is not supported. So I'm doing what amounts to a nested-loops self-join in code and aggregating as I go.
Second, I've run into problems trying to join a partitioned table to a view derived from the same table. Details are slightly involved and maybe require a separate thread, but the upshot is I decided to maintain an aggregation table directly from the stored procedure that modifies the base table, so again I'm doing the aggregation in code in my stored procedure.