From 2ef6f11b0c77ec323c688ddfd98ffabddb72c11d Mon Sep 17 00:00:00 2001
From: Andrew Dunstan <andrew@dunslane.net>
Date: Wed, 6 Apr 2022 10:25:45 -0400
Subject: Reduce running time of jsonb_sqljson test

The test created a 1m row table in order to test parallel operation of
JSON_VALUE. However, this was more than were needed for the test, so
save time by halving it, and also by making the table unlogged.
Experimentation shows that this size is only a little above the number
required to generate the expected output.

Per gripe from Andres Freund

Discussion: https://postgr.es/m/20220406022118.3ocqvhxr6kciw5am@alap3.anarazel.de
---
 src/test/regress/sql/jsonb_sqljson.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/test/regress/sql/jsonb_sqljson.sql')

diff --git a/src/test/regress/sql/jsonb_sqljson.sql b/src/test/regress/sql/jsonb_sqljson.sql
index 90c59754889..866c708a4d7 100644
--- a/src/test/regress/sql/jsonb_sqljson.sql
+++ b/src/test/regress/sql/jsonb_sqljson.sql
@@ -948,9 +948,9 @@ SELECT JSON_QUERY(jsonb '{"a": 123}', 'error' || ' ' || 'error');
 SELECT * FROM JSON_TABLE(jsonb '{"a": 123}', '$' || '.' || 'a' COLUMNS (foo int));
 
 -- Test parallel JSON_VALUE()
-CREATE TABLE test_parallel_jsonb_value AS
+CREATE UNLOGGED TABLE test_parallel_jsonb_value AS
 SELECT i::text::jsonb AS js
-FROM generate_series(1, 1000000) i;
+FROM generate_series(1, 500000) i;
 
 -- Should be non-parallel due to subtransactions
 EXPLAIN (COSTS OFF)
-- 
cgit v1.2.3

