-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Subqueries run much slower for simple SELECT statement #9122
Comments
👋 again BTW 😄 I can provide sample data to reproduce this if you want, just get in touch with me on Gopher Slack |
I notice the same thing. Influxdb-1.3.6 on CentOS 7.2. Even something as simple as:
returns instantly (for 5M values), where
takes over a minute. |
We have seen this problem too, but I found that by moving the time constraint from the inner to the outer select, the query would complete much faster, and as expected. Time in inner select ran in 37 seconds
Time in outer select ran in 2 seconds
Original single query ran in 2 seconds
|
I'm running into this in 1.5.3. I've found some detail using The By moving the WHERE clause to the outer query, the query runs much faster and To make this a bit more concrete, here's the query I want to run. This takes around 45 seconds and creates iterators on 25 shards: Moving the WHERE clause to the outside speeds things up to about 3 seconds and create an iterator on one shard only. The same data is returned as above: This seems like a bug to me, I'd expect the planner to use the WHERE clause to limit the scope of the subquery that has the WHERE clause. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions. |
This still is an issue :( |
from @trollvottel , this is still an issue in 1.7.9. |
I can confirm this issue (running 1.6.3). We're doing lots of queries like this
The inner query itselfs runs pretty fast, but combined it takes ages. It doesn't make a difference if add a second timefilter on the outer query. |
Same problem on 1.7.4. |
This is scheduled for the 1.8.1 release and should be backported to the 1.7 line as well. It will not be backported to 1.6 so you will need to upgrade. |
I don't know about "1.8.1" or "1.7" or "1.6", but I am seeing this issue here:
|
Grafana is not InfluxDB.
Von meinem iPhone gesendet
… Am 12.06.2020 um 03:18 schrieb freebsdfrau ***@***.***>:
I don't know about "1.8.1" or "1.7" or "1.6", but I am seeing this issue here:
$ grafana-server -v
Version 6.2.5 (commit: 6082d19, branch: HEAD)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Derp! Thanks! So, I am still seeing this in Influxdb-1.7.7 Do you know what version in the 1.7 line will receive the backport? |
I have no idea, sorry. I‘m just a user.
Von meinem iPhone gesendet
… Am 12.06.2020 um 18:35 schrieb freebsdfrau ***@***.***>:
Derp! Thanks!
So, I am still seeing this in Influxdb-1.7.7
Do you know what version in the 1.7 line will receive the backport?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sorry, I guess that was addressed to @russorat |
@dgnorton since 1.8.3 has already been released. Did somebody had time to look into this problem yet? |
Waiting for this, too |
Hello all. |
influxdata/influxdb#9122 Found out that my subqueries were bogging down my DB. I adjusted them as recommended in the above issue report. There were also 2 widgets with hardcoded and incorrect datasources.
Same issue happening in influx 1.8 with this query: Tried removing time constraint in the inner query but still taking more than 20s to run. |
Bug report
System info: [Include InfluxDB version, operating system name, and other relevant details]
Amazon Linux
InfluxDB 1.3.6
Steps to reproduce:
Expected behavior: [What you expected to happen]
I would expect these queries to take about the same amount of time
Actual behavior: [What actually happened]
the 2nd query takes around 30-60s whereas the first returns almost instantly
Additional info: [Include gist of relevant config, logs, etc.]
I will attach vars.txt and iostat.txt in a comment
The text was updated successfully, but these errors were encountered: