Are dimensions really required on group by queries?

I have a data set that consists of 2 dimensions and 1 metrics. I’m able to successfully query for the metrics with out specifying dimensions in the query. Is there a performance penalty to not specifying the dimension?

Going off documentation here: http://druid.io/docs/latest/querying/groupbyquery.html

query Im using w/o dimensions:

{
“queryType”: “groupBy”,
“dataSource”: “users”,
“descending”: “false”,
“filter”: {
“type”: “or”,
“fields”: [
{“type”: “selector”, “dimension”: “attrA”, “value”: “123”},
{“type”: “selector”, “dimension”: “attrA”, “value”: “321”}
]
},
“aggregations”: [
{
“type”: “thetaSketch”,
“name”: “allUsers”,
“fieldName”: “numUsersTheta”
},
{
“type” : “filtered”,
“filter” : {
“type” : “and”,
“fields”: [
{ “type”: “selector”, “dimension”: “attrA”, “value”: “123” },
{ “type”: “selector”, “dimension”: “attrB”, “value”: “456” }
]
},

  "aggregator" : { "type": "thetaSketch", "name": "A_users", "fieldName": "numUsersTheta"}
},
{
  "type" : "filtered",
  "filter" : {
    "type" : "and",
    "fields": [
        { "type": "selector", "dimension": "attrA", "value": "321" },
        { "type": "selector", "dimension": "attrB", "value": "654" }
  ]
  },

  "aggregator" : { "type": "thetaSketch", "name": "B_users", "fieldName": "numUsersTheta"}
}
],
"postAggregations": [
{
  "type": "thetaSketchEstimate",
  "name": "final_unique_users",
  "errorBoundsStdDev":2,
  "field":
  {
    "type": "thetaSketchSetOp",
    "name": "final_unique_users_sketch",
    "func": "INTERSECT",
    "fields": [
      {
        "type": "fieldAccess",
        "fieldName": "A_users"
      },
      {
        "type": "fieldAccess",
        "fieldName": "B_users"
      }
    ]
  }
}

],
“threshold”: 10000,
“granularity”: “all”,
“intervals”: [
“2018-11-01/2018-11-02”
]

}

``

Hey Aaron,

The dimensions can be empty. It actually used to be required, but now it’s not – looks like the docs could use an update!

But that being said, if you aren’t using dimensions, then it will generally be faster to use a “timeseries” query type rather than “groupBy”.