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

Group By does not seem to work #27

Closed
FGRibreau opened this issue Nov 9, 2013 · 2 comments
Closed

Group By does not seem to work #27

FGRibreau opened this issue Nov 9, 2013 · 2 comments

Comments

@FGRibreau
Copy link

Influx> select instantaneous_ops_per_sec from info group by serverId limit 10;
┌───────────────┬─────────────────┬───────────────────────────┬──────────────────────────┐
│ time          │ sequence_number │ instantaneous_ops_per_sec │ serverId                 │
├───────────────┼─────────────────┼───────────────────────────┼──────────────────────────┤
│ 1383993817575 │ 242             │ 1                         │ 514883646ff643576b000035 │
│ 1383993817564 │ 241             │ 1                         │ 526d71e23202e35309000001 │
│ 1383993811560 │ 240             │ 1                         │ 514883646ff643576b000035 │
│ 1383993811555 │ 239             │ 1                         │ 526d71e23202e35309000001 │
│ 1383993805567 │ 238             │ 1                         │ 514883646ff643576b000035 │
│ 1383993805555 │ 237             │ 1                         │ 526d71e23202e35309000001 │
│ 1383993799557 │ 236             │ 1                         │ 514883646ff643576b000035 │
│ 1383993799547 │ 235             │ 1                         │ 526d71e23202e35309000001 │
│ 1383993793564 │ 234             │ 1                         │ 514883646ff643576b000035 │
│ 1383993793558 │ 233             │ 1                         │ 526d71e23202e35309000001 │
Influx> select count(instantaneous_ops_per_sec) from info group by serverId limit 10;
Influx> # nothing was returned
@jvshahid
Copy link
Contributor

I just added an integration test to make sure that count queries work, I can't reproduce the issue. Your problem might be the start/end time of the query. By default the start time is set to now () - 1 hour. Try

select count(instantaneous_ops_per_sec) from info where time > now() - 10d group by serverId limit 10;

If this doesn't work, it could be something special with your data. Can you provide a script that will reproduce the bug.

@FGRibreau
Copy link
Author

Influx> select instantaneous_ops_per_sec from info group by serverId where time > now() - 10d limit 10;
┌───────────────┬─────────────────┬───────────────────────────┬──────────────────────────┐
│ time          │ sequence_number │ instantaneous_ops_per_sec │ serverId                 │
├───────────────┼─────────────────┼───────────────────────────┼──────────────────────────┤
│ 1383996650387 │ 1186            │ 1                         │ 514883646ff643576b000035 │
│ 1383996650378 │ 1185            │ 1                         │ 526d71e23202e35309000001 │
│ 1383996644384 │ 1184            │ 1                         │ 514883646ff643576b000035 │
│ 1383996644375 │ 1183            │ 1                         │ 526d71e23202e35309000001 │
│ 1383996638379 │ 1182            │ 1                         │ 514883646ff643576b000035 │
│ 1383996638368 │ 1181            │ 1                         │ 526d71e23202e35309000001 │
│ 1383996632380 │ 1180            │ 1                         │ 514883646ff643576b000035 │
│ 1383996632372 │ 1179            │ 1                         │ 526d71e23202e35309000001 │
│ 1383996626380 │ 1178            │ 1                         │ 514883646ff643576b000035 │
│ 1383996626372 │ 1177            │ 1                         │ 526d71e23202e35309000001 │
└───────────────┴─────────────────┴───────────────────────────┴──────────────────────────┘
Influx> select count(instantaneous_ops_per_sec) from info where time > now() - 10d group by serverId limit 10;
Influx> (returns nothing)
GET http://localhost:8086/db/redsmin/series?u=root&p=root&q=select%20count(instantaneous_ops_per_sec)%20from%20info%20where%20time%20%3E%20now()%20-%2010d%20group%20by%20serverId%20limit%2010%3B&time_precision=m&chunked=false
=> []

I send you a zip file of my data via twitter DM ;)

jvshahid pushed a commit that referenced this issue Aug 12, 2014
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

2 participants