Hi all,

the root cause for this issue seems to be that the ternary operator is 
executed using V8 still. This works but is unintended, as it may execute 
slower than executing it natively (in C++).
I am currently working on a fix for this, which should make the original 
query as fast as the alternative workarounds.

Best regards
Jan

Am Dienstag, 9. August 2016 02:15:41 UTC+2 schrieb BrandonJS:
>
> Both methods worked and are much faster!  The TO_BOOL function is a bit 
> quicker and I think a bit more concise of the two.  
>
> Using TO_BOOL it takes about 1.9 seconds to execute (compared to the ? 
> operator's 8 seconds).  It only adds about 0.5 seconds to the overall query 
> which I think is more than acceptable.
>
>
> Replaced:
>     ficoUPB = SUM( IS_NULL(l.Acquisition.BORROWER_CREDIT_SCORE) ? 0 : l.
> Acquisition.ORIGINAL_UPB )
>
> With either of these:
>     ficoUPB = SUM( TO_BOOL(l.Acquisition.BORROWER_CREDIT_SCORE) * l.
> Acquisition.ORIGINAL_UPB)
>     ficoUPB = SUM( MIN([1, MAX([l.Acquisition.BORROWER_CREDIT_SCORE, 0])]) 
> * l.Acquisition.ORIGINAL_UPB )
>
> Had to do a MIN and a MAX to get l.Acquisition.BORROWER_CREDIT_SCORE to be 
> either 0 or 1.
>
> Thanks for the help!
>

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to