diff --git a/tests/performance/group_by_fixed_keys.xml b/tests/performance/group_by_fixed_keys.xml
index a64208eb3de..d74b65ad47a 100644
--- a/tests/performance/group_by_fixed_keys.xml
+++ b/tests/performance/group_by_fixed_keys.xml
@@ -11,7 +11,7 @@
create table group_by_fk(a UInt32, b UInt32, c LowCardinality(UInt32), d Nullable(UInt32), e UInt64, f UInt64, g UInt64, h LowCardinality(UInt64), i Nullable(UInt64)) engine=MergeTree order by tuple()
- insert into group_by_fk select number, number, number % 10000, number % 2 == 0 ? number : Null, number, number, number, number % 10000, number % 2 == 0 ? number : Null from numbers_mt(3e7)
+ insert into group_by_fk select number, number, number % 10000, number % 2 == 0 ? number : Null, number, number, number, number % 10000, number % 2 == 0 ? number : Null from numbers_mt(1e7) settings max_insert_threads=8
select a, b from group_by_fk group by a, b format Null
diff --git a/tests/performance/join_used_flags.xml b/tests/performance/join_used_flags.xml
index 70b0b45391d..1bb994f7be2 100644
--- a/tests/performance/join_used_flags.xml
+++ b/tests/performance/join_used_flags.xml
@@ -1,6 +1,6 @@
CREATE TABLE test_join_used_flags (i64 Int64, i32 Int32) ENGINE = Memory
- INSERT INTO test_join_used_flags SELECT number AS i64, rand32() AS i32 FROM numbers_mt(3000000)
+ INSERT INTO test_join_used_flags SELECT number AS i64, rand32() AS i32 FROM numbers_mt(1500000)
SELECT l.i64, r.i64, l.i32, r.i32 FROM test_join_used_flags l RIGHT JOIN test_join_used_flags r USING i64 format Null
DROP TABLE IF EXISTS test_join_used_flags