Skip to content

Commit

Permalink
Added new simple count(*) query and search equivalent (#498)
Browse files Browse the repository at this point in the history
This is to compare ESQL to plan terms agg.
  • Loading branch information
craigtaverner authored Oct 27, 2023
1 parent 17aa310 commit 27c34d2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
18 changes: 18 additions & 0 deletions nyc_taxis/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,24 @@
"warmup-iterations": 10,
"iterations": 50
},
{
"operation": "count_group_by_keyword_aggregation",
"clients": 1,
"warmup-iterations": 10,
"iterations": 50
},
{
"operation": "count_group_by_keyword_esql_shard_partitioning",
"clients": 1,
"warmup-iterations": 10,
"iterations": 50
},
{
"operation": "count_group_by_keyword_esql_doc_partitioning",
"clients": 1,
"warmup-iterations": 10,
"iterations": 50
},
{
"operation": "multi_terms-keyword",
"clients": 1,
Expand Down
28 changes: 28 additions & 0 deletions nyc_taxis/operations/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,34 @@
"query" : "FROM nyc_taxis | stats avg(total_amount) by rate_code_id | sort rate_code_id",
"body": { "pragma": { "data_partitioning": "doc" } }
},
{
"name": "count_group_by_keyword_aggregation",
"operation-type": "search",
"index": "nyc_taxis",
"request-timeout": 120,
"body": {
"size": 0,
"aggs": {
"by_rate_code_id": {
"terms": {
"field": "rate_code_id"
}
}
}
}
},
{
"name": "count_group_by_keyword_esql_shard_partitioning",
"operation-type": "esql",
"query" : "FROM nyc_taxis | stats count=count(*) by rate_code_id | sort count desc",
"body": { "pragma": { "data_partitioning": "shard" } }
},
{
"name": "count_group_by_keyword_esql_doc_partitioning",
"operation-type": "esql",
"query" : "FROM nyc_taxis | stats count=count(*) by rate_code_id | sort count desc",
"body": { "pragma": { "data_partitioning": "doc" } }
},
{
"name": "avg_passenger_count_filtered_aggregation",
"operation-type": "search",
Expand Down

0 comments on commit 27c34d2

Please sign in to comment.