Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance of contains is not good #5518

Open
DavideViolante opened this issue Dec 10, 2024 · 0 comments
Open

performance of contains is not good #5518

DavideViolante opened this issue Dec 10, 2024 · 0 comments

Comments

@DavideViolante
Copy link

DavideViolante commented Dec 10, 2024

Hello,
I have a huge dataset of data on influx for at least 4 years (data every 2 minutes).
We found out that our queries using contains are way slower than the one using a simple OR operator.

Fast, some ms:

from(bucket: "fybra")
    |> range(start: -7d)
    |> filter(fn: (r) => r["device"] == "123456" or r["device"] == "789012", ...)

Super slow (30+ seconds or timeout):

from(bucket: "fybra")
    |> range(start: -7d)
    |> filter(fn: (r) => contains(value: r.device, set: ["123456", "789012", ...]))

How is this even possible?

Might be related or duplicate of: #3546

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant