[Mondrian] Unnecessary sorting in axis loading?

Eric McDermid mcdermid at stonecreek.com
Fri May 1 18:56:53 EDT 2009

On May 1, 2009, at 3:30 PM, Julian Hyde wrote:

> We don't make such a clear-cut distinction between the 'loading  
> pass' and
> 'final pass'. If all cells are already loaded, evaluation might take  
> only 1
> pass; if there are complex calculations, it may take more than 2.  
> So, I
> don't want to introduce a huge distinction between passes.
> In particular, consider the case where a sort is important to  
> semantics,
> e.g. Head(Order(...), ...) or Head(Crossjoin(Order(...),  
> Order(...)), ...).

Ah, thank you.  I thought there might be cases where the sort could  
affect semantics, but I was drawing a complete blank.

> Can you propose a way to detect that (a) we have had cache misses so  
> this is
> definitely not the final pass and (b) the order that this function  
> returns
> results is not necessary to ensure the correct pattern of cache  
> accesses?

Not right off, but that's enough meat for me to start thinking about  
it more earnestly.

If nothing else, (b) might be achievable when the sort is the  
outermost operator in an expression.  While that's a specialized case,  
it may well also be a common one.

> Also note that I fixed a problem relating to sorting this week. See  
> change
> 12668, and RolapResult.mergeAxes. mergeAxes will sort repeatedly if  
> there
> are many columns, and when both axes have NONEMPTY, and some other  
> side
> conditions. It may not apply to the cases you are interested in.

Don't think it affects the cases I'm looking at, but I'll keep an eye  
out for it.  Unfortunately, I'm still trying to optimize partial sorts  
on 2.4, which needs to happen before I can try to get everything  
ported up to the latest version.

  -- Eric

More information about the Mondrian mailing list