the last |> group |> drop statements are taking much longer (let’s say at least 10X longer - see analysis note below). So the add’l mail_type filter is reducing the data set by about 10X.
Analysis Note:
The from |> range |> filter ("1057_Cust") take processing time, of course, but these are not driving the poor performance (40 sec) of the first query. If these statements took zero time to execute, then a straight ratio (40/2.3)=17.4 would suggest about 17X more data without filtering on “mail_type”
If the question is “why is either query taking seconds vs say, ms” then knowing the hardware config and processor loading while executing these scripts would be helpful. I suppose there might be an InFluxDB setting that needs tuning, but OSS usually works fine right “out-of-the-box”.
So to summarize, if the two queries were run under the same processor loading conditions then the 40 sec case can be explained by having to process more data by last |> group |> drop. But if execution time of seconds for either query is the core question, then more knowledge of the hardware, the processor loading, and the Data_DB data set schema would help to diagnose that issue.
@debnath Would you run each case and include the logs for each. Are the results repeatable - same execution time no matter how many times it’s run? Thanks.
What kind of log you are talking about. Is there anything to enable for performance log or debug log or something?
where can we get it?
The execution result time is almost same.