Commit a7070704 authored by Tom's avatar Tom Committed by Heinz N. Gies

Dont optimize too big queries (#44)

parent 31b1718f
......@@ -161,9 +161,13 @@ run(Query, Timeout) ->
Sender = {dflow_send, [self(), WaitRef, Funnel]},
%% We only optimize the flow when there are at least 10% duplicate
%% gets, or in other words if less then 90% of the requests are
%% unique
%% unique.
%% Queries across a lot of series are blowing up memo on
%% optimization, so we run otimization only on resonably small
%% queries.
FlowOpts = case Unique / Total of
UniquePercentage when UniquePercentage > 0.9 ->
UniquePercentage when UniquePercentage > 0.9;
Total > 1000 ->
[terminate_when_done];
_ ->
[optimize, terminate_when_done]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment