Hi Rachel here are the query plans for both queries
Datasource Size:
~20MB
~41k rows
Query1:
Group By with count() - Timeout
"queryType": "topN",
"dataSource": {
"type": "table",
"name": "compliance-reports"
},
"virtualColumns": [],
"dimension": {
"type": "default",
"dimension": "pbx_status",
"outputName": "d0",
"outputType": "STRING"
},
"metric": {
"type": "dimension",
"previousStop": null,
"ordering": {
"type": "lexicographic"
}
},
"threshold": 100,
"intervals": {
"type": "intervals",
"intervals": [
"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"
]
},
"filter": null,
"granularity": {
"type": "all"
},
"aggregations": [
{
"type": "count",
"name": "a0"
}
],
"postAggregations": [],
"context": {
"sqlOuterLimit": 100,
"sqlQueryId": "21f58119-c113-476e-a739-abaea7b2b419"
},
"descending": false
}```
Query2:
Group By without count() - Query Time: 0.4s
```{
"queryType": "topN",
"dataSource": {
"type": "table",
"name": "compliance-reports"
},
"virtualColumns": [],
"dimension": {
"type": "default",
"dimension": "pbx_status",
"outputName": "d0",
"outputType": "STRING"
},
"metric": {
"type": "dimension",
"previousStop": null,
"ordering": {
"type": "lexicographic"
}
},
"threshold": 100,
"intervals": {
"type": "intervals",
"intervals": [
"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"
]
},
"filter": null,
"granularity": {
"type": "all"
},
"aggregations": [],
"postAggregations": [],
"context": {
"sqlOuterLimit": 100,
"sqlQueryId": "e5a52624-e2e1-4337-a5af-216e09feb934"
},
"descending": false
}```