From 8018eb4612f64f773cbbff6f2a1593d7efdaaca7 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Wed, 23 Jun 2021 10:53:05 +0300 Subject: [PATCH] storage_proxy: use small_vector in storage_proxy::query_singular to store executors Having only one pk to query is the common case, so avoid allocating executor vector for that case. --- service/storage_proxy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index 10a6e0eb0c..1bd0340500 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -3978,7 +3978,7 @@ storage_proxy::query_singular(lw_shared_ptr cmd, dht::partition_range_vector&& partition_ranges, db::consistency_level cl, storage_proxy::coordinator_query_options query_options) { - std::vector, dht::token_range>> exec; + utils::small_vector, dht::token_range>, 1> exec; exec.reserve(partition_ranges.size()); schema_ptr schema = local_schema_registry().get(cmd->schema_version);