'order by formula' has to load every record in the selection no matter what the 
expressions are, because every expression expects the correct record to be 
current.

You can't possibly expect me to do some kind of heuristics on the expressions 
and optimize accordingly, especially in this case where you are using a field 
of a table as the key for a collection.

I specifically said on this list and in the documentation that there is a 
potential performance penalty on Remote.

On Nov 27, 2012, at 4:45 AM, Peter Gutbrod <[email protected]> wrote:

> Out of interest:
> 
> What happens internally, if I do an "order by formula" on a collection,
> which has an ID of the sort table as the key?
> 
> Aka.
> 
> order by formula(*; [contacts]; $collection{[contacts]ID})
> 
> Does is load each record of the current selection or does is just copy
> [contacts]ID into an array and use that for the sort?
> 
> Would make a big difference in performace if you run it on Remote.
> 
> Peter
> 
> 
> 
>> Hello,
>> 
>> The latest and greatest version of Active4D, the ultimate 4D web development
>> environment, is now available for download. Active4D v6.0r8 is a feature
>> release:
>> 
>> - ORDER BY FORMULA now has an option to be executed within Active4D¹s 
>> context,
>> which allows access to Active4D¹s full execution environment within the order
>> by expressions.
>> 
> 
> 
> 
> _______________________________________________
> Active4D-dev mailing list
> [email protected]
> http://list.aparajitaworld.com/listinfo/active4d-dev
> Archives: http://active4d-nabble.aparajitaworld.com/

Regards,

   Aparajita

_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/

Reply via email to