-
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
Wire up ORDER BY #2022
Comments
+1 |
i hate to just +1 so here's a shell script. i hope this isn't overlooked for 0.9 echo "creating database"
curl -G -ipv4 http://localhost:8086/query --data-urlencode "q=CREATE DATABASE foo"
echo "inserting data"
curl -d "{\"database\" : \"foo\", \"points\": [{\"name\": \"cpu\", \"tags\": {\"region\":\"uswest\",\"host\": \"server01\"},\"fields\": {\"value\": 100}}]}" -H "Content-Type: application/json" -ipv4 http://localhost:8086/write
echo "inserting data"
curl -d "{\"database\" : \"foo\", \"points\": [{\"name\": \"cpu\", \"tags\": {\"region\":\"uswest\",\"host\": \"server01\"},\"fields\": {\"value\": 300}}]}" -H "Content-Type: application/json" -ipv4 http://localhost:8086/write
echo "inserting data"
curl -d "{\"database\" : \"foo\", \"points\": [{\"name\": \"cpu\", \"tags\": {\"region\":\"uswest\",\"host\": \"server01\"},\"fields\": {\"value\": 200}}]}" -H "Content-Type: application/json" -ipv4 http://localhost:8086/write
sleep 1
echo "querying data"
curl -G -ipv4 http://localhost:8086/query --data-urlencode "db=foo" --data-urlencode "q=select * from cpu order by value asc" --data-urlencode "pretty=true"
echo "querying data"
curl -G -ipv4 http://localhost:8086/query --data-urlencode "db=foo" --data-urlencode "q=select * from cpu order by value desc" --data-urlencode "pretty=true" |
@beckettsean could this get put into the 0.9.0 milestone? |
Same issue here. |
really wanna know how this issue going? |
This will have to wait for a refactoring we're about to do on the query engine. Pushed to 0.9.1 |
So what is the "get the latest value of measurement X" workaround until then? |
Unfortunately, there is no good way to get it until we have that set up. If you have a regular sampling interval and you know it, then you can limit the time scope of your query accordingly. |
It's in the roadmap. Don't worry. |
It's in the roadmap. 9.2? |
Thanks for your reply, so when can we get that version? @aviau |
@zhulinhong we do not publish release dates for features. The 0.9.2 release will be out on July 23rd and this issue is currently scheduled for that release, but that doesn't mean it will be in that version. This issue contains ALL relevant info about the schedule and progress. |
0.92rc1 has an odd sense of humour.
|
did it make it into 0.9.2? |
Working @dswarbrick That error will be not be in 0.9.2 final (see #3409). |
seem will not make it into 0.9.3 still...... really need this feature. Any related PR or solution discussion? |
@CrazyJvm this is the only relevant issue for ORDER BY. I am unaware of a working PR yet. |
Without orderby desc, is there a simple way to get the latest point for a given series? Right now it seems like I have to select all the points in the series and take the last one in my application. Not difficult but it's a lot of extra reads against the DB. I can cut it down by filtering on time but this comes at the possible cost of accuracy/data correctness in my use case (I won't always known how far back the "latest" point will be). |
You can use |
yeah, but the way the |
@jwilder are you just wiring up ASC and DESC for ORDER BY time, or will you also add ORDER BY tag in this iteration? |
@beckettsean Just time. |
Added #3954 for ORDER BY tag |
The text was updated successfully, but these errors were encountered: