You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/12/16 11:02:11 UTC

[GitHub] [incubator-druid] AvinoamBN edited a comment on issue #9017: help understanding some basics to overcome query lag

AvinoamBN edited a comment on issue #9017: help understanding some basics to overcome query lag
URL: https://github.com/apache/incubator-druid/issues/9017#issuecomment-565996396
 
 
   Thanks again for your reply @himanshug ,
   So what am I doing wrong?
   the docs say: 
   
   > 
   
   Metric | Description | Dimensions | Normal Value
   -- | -- | -- | --
   query/time | Milliseconds taken to complete a query. | Common:  dataSource, type, interval, hasFilters, duration, context,  remoteAddress, id. Aggregation Queries: numMetrics, numComplexMetrics.  GroupBy: numDimensions. TopN: threshold, dimension. | < 1s
   
   So im running two different type of query, an SQL one and a JSON one, both via the POST API.
   
   SQL query is pretty much this:
   `SELECT * FROM \"metrics\" WHERE  \"metric\" = 'query/time'`
   This returns results like this:
   ```
   {
       "__time": "2019-11-16T09:00:07.594Z",
       "count": 1,
       "dataSource": "orgrimmar",
       "hasFilters": "true",
       "host": "druid-broker1:8083",
       "interval": "2019-10-30T10:24:18.761Z/2019-11-16T09:00:01.771Z",
       "metric": "query/time",
       "numComplexMetrics": 0,
       "numDimensions": 0,
       "numMetrics": 0,
       "server": "",
       "type": "select",
       "value": 2482
     },
   ```
   there is no "id" in that result, nor other things mentioned in the doc's (such as: duration, context,  remoteAddress...)
   
   JSON query looks like this:
   ```
   {
     "queryType": "select",
     "dataSource": "metrics",
     "granularity": "all",
   	"dimensions": [],
   	"filter": {
   		"type": "in",
   		"dimension": "metric",
   		"values": ["query/time"]
   	},
   	"intervals": [
   		"2019-12-16T00:00:00/2019-12-16T23:59:59"
   	],
   	"pagingSpec":{"pagingIdentifiers": {}, "threshold":1 }
   }
   ```
   this returns results like this:
   ```
   [
     {
       "timestamp": "2019-12-16T00:00:00.003Z",
       "result": {
         "pagingIdentifiers": {
           "metrics_2019-12-16T00:00:00.000Z_2019-12-16T01:00:00.000Z_2019-12-16T04:35:02.747Z": 0
         },
         "dimensions": [
           "server",
           "metric",
           "hasFilters",
           "host",
           "interval",
           "type",
           "dataSource"
         ],
         "metrics": [
           "numComplexMetrics",
           "numDimensions",
           "count",
           "numMetrics",
           "value"
         ],
         "events": [
           {
             "segmentId": "metrics_2019-12-16T00:00:00.000Z_2019-12-16T01:00:00.000Z_2019-12-16T04:35:02.747Z",
             "offset": 0,
             "event": {
               "timestamp": "2019-12-16T00:00:02.010Z",
               "dataSource": "orgrimmar",
               "server": null,
               "type": "groupBy",
               "interval": [
                 "2019-12-09T14:00:00.000Z/2019-12-09T15:00:00.000Z",
                 "2019-12-10T13:00:00.000Z/2019-12-10T14:00:00.000Z",
                 "2019-12-12T03:00:00.000Z/2019-12-12T04:00:00.000Z",
                 "2019-12-12T21:00:00.000Z/2019-12-12T22:00:00.000Z",
                 "2019-12-13T12:00:00.000Z/2019-12-13T13:00:00.000Z",
                 "2019-12-15T02:00:00.000Z/2019-12-15T03:00:00.000Z"
               ],
               "metric": "query/time",
               "host": "druid-historical40:8083",
               "hasFilters": "false",
               "numComplexMetrics": 0,
               "numDimensions": 2,
               "count": 2,
               "numMetrics": 2,
               "value": 258
             }
           }
         ]
       }
     }
   ]
   ```
   once again, there is no dimension named "id".
   
   Am I querying this wrong, looking at it wrong, or understanding it wrong?
   I have read the docs a few times now. its either I'm lacking some basic understanding of this, or I'm looking at this the wrong way.
   
   Please advise,
   thank you so much

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org