diff --git a/esql/challenges/default.json b/esql/challenges/default.json index bd017a908..747f76989 100644 --- a/esql/challenges/default.json +++ b/esql/challenges/default.json @@ -71,6 +71,35 @@ "iterations": {{query_iterations | default(100)}} }, + { + "operation": "from_idx_limit_1_by_key_1000", + "tags": ["esql_large_schema"], + "clients": {{query_clients | default(1)}}, + "warmup-iterations": 10, + "iterations": {{query_iterations | default(100)}} + }, + { + "operation": "from_idx_limit_10_by_key_1000", + "tags": ["esql_large_schema"], + "clients": {{query_clients | default(1)}}, + "warmup-iterations": 10, + "iterations": {{query_iterations | default(100)}} + }, + { + "operation": "from_idx_limit_1000_by_key_1000", + "tags": ["esql_large_schema"], + "clients": {{query_clients | default(1)}}, + "warmup-iterations": 10, + "iterations": {{query_iterations | default(100)}} + }, + { + "operation": "from_idx_limit_10000_by_key_1000", + "tags": ["esql_large_schema"], + "clients": {{query_clients | default(1)}}, + "warmup-iterations": 10, + "iterations": {{query_iterations | default(100)}} + }, + { "operation": "from_idx_limit_1_drop_null", diff --git a/esql/operations/default.json b/esql/operations/default.json index f6f443371..75639d512 100644 --- a/esql/operations/default.json +++ b/esql/operations/default.json @@ -33,6 +33,27 @@ "query": "FROM idx_* | limit 10000" }, + { + "name": "from_idx_limit_1_by_key_1000", + "operation-type": "esql", + "query": "FROM idx_* | LIMIT 1 BY key_1000" + }, + { + "name": "from_idx_limit_10_by_key_1000", + "operation-type": "esql", + "query": "FROM idx_* | LIMIT 10 BY key_1000" + }, + { + "name": "from_idx_limit_1000_by_key_1000", + "operation-type": "esql", + "query": "FROM idx_* | LIMIT 1000 BY key_1000" + }, + { + "name": "from_idx_limit_10000_by_key_1000", + "operation-type": "esql", + "query": "FROM idx_* | LIMIT 10000 BY key_1000" + }, + { "name": "from_idx_limit_1_drop_null", "operation-type": "esql", diff --git a/nyc_taxis/challenges/default.json b/nyc_taxis/challenges/default.json index 638fa1feb..bc1a7a372 100644 --- a/nyc_taxis/challenges/default.json +++ b/nyc_taxis/challenges/default.json @@ -1131,6 +1131,40 @@ "warmup-iterations": 10, "iterations": 50 }, + {%- endif -%}{# non-serverless-doc-partitioning-marker-end #} + { + "operation": "topnby_by_payment_type_query", + "clients": 1, + "warmup-iterations": 10, + "iterations": 50 + }, + { + "operation": "topnby_by_payment_type_esql_segment_partitioning", + "clients": 1, + "warmup-iterations": 10, + "iterations": 50 + }, + {# non-serverless-doc-partitioning-marker-start #}{%- if build_flavor != "serverless" -%} + { + "operation": "topnby_by_payment_type_esql_doc_partitioning", + "clients": 1, + "warmup-iterations": 10, + "iterations": 50 + }, + {%- endif -%}{# non-serverless-doc-partitioning-marker-end #} + { + "operation": "topnby_by_payment_type_vendor_id_esql_segment_partitioning", + "clients": 1, + "warmup-iterations": 10, + "iterations": 50 + }, + {# non-serverless-doc-partitioning-marker-start #}{%- if build_flavor != "serverless" -%} + { + "operation": "topnby_by_payment_type_vendor_id_esql_doc_partitioning", + "clients": 1, + "warmup-iterations": 10, + "iterations": 50 + }, {%- endif -%}{# non-serverless-doc-partitioning-marker-end #} { "operation": "date_histogram_calendar_interval", diff --git a/nyc_taxis/operations/default.json b/nyc_taxis/operations/default.json index ea13e0e58..358a9e3b0 100644 --- a/nyc_taxis/operations/default.json +++ b/nyc_taxis/operations/default.json @@ -1487,6 +1487,59 @@ "pragma": { "data_partitioning": "doc" } } }, + {%- endif -%}{# non-serverless-doc-partitioning-marker-end #} + { + "name": "topnby_by_payment_type_query", + "operation-type": "search", + "index": "nyc_taxis", + "body": { + "size": 10, + "_source": false, + "fields": ["pickup_datetime", "dropoff_datetime", "trip_distance", "payment_type"], + "sort": { "pickup_datetime": "desc" }, + "collapse": { + "field": "payment_type", + "inner_hits": { + "name": "top_hits", + "size": 50, + "sort": [{ "pickup_datetime": "desc" }], + "_source": false, + "fields": ["pickup_datetime", "dropoff_datetime", "trip_distance", "payment_type"] + } + } + } + }, + { + "name": "topnby_by_payment_type_esql_segment_partitioning", + "operation-type": "esql", + "query" : "FROM nyc_taxis | sort pickup_datetime desc | KEEP pickup_datetime, dropoff_datetime, trip_distance, payment_type | LIMIT 50 BY payment_type" + }, + {# non-serverless-doc-partitioning-marker-start #}{%- if build_flavor != "serverless" -%} + { + "name": "topnby_by_payment_type_esql_doc_partitioning", + "operation-type": "esql", + "query" : "FROM nyc_taxis | sort pickup_datetime desc | KEEP pickup_datetime, dropoff_datetime, trip_distance, payment_type | LIMIT 50 BY payment_type", + "body": { + "accept_pragma_risks": true, + "pragma": { "data_partitioning": "doc" } + } + }, + {%- endif -%}{# non-serverless-doc-partitioning-marker-end #} + { + "name": "topnby_by_payment_type_vendor_id_esql_segment_partitioning", + "operation-type": "esql", + "query" : "FROM nyc_taxis | sort pickup_datetime desc | KEEP pickup_datetime, dropoff_datetime, trip_distance, payment_type, vendor_id | LIMIT 50 BY payment_type, vendor_id" + }, + {# non-serverless-doc-partitioning-marker-start #}{%- if build_flavor != "serverless" -%} + { + "name": "topnby_by_payment_type_vendor_id_esql_doc_partitioning", + "operation-type": "esql", + "query" : "FROM nyc_taxis | sort pickup_datetime desc | KEEP pickup_datetime, dropoff_datetime, trip_distance, payment_type, vendor_id | LIMIT 50 BY payment_type, vendor_id", + "body": { + "accept_pragma_risks": true, + "pragma": { "data_partitioning": "doc" } + } + }, {%- endif -%}{# non-serverless-doc-partitioning-marker-end #} { "name": "date_histogram_calendar_interval_esql_segment_partitioning",