File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -200,9 +200,9 @@ SELECT h.seqno AS f20000
200200-- Cause some overflow insert and splits.
201201--
202202CREATE TABLE hash_split_heap (keycol INT);
203+ INSERT INTO hash_split_heap SELECT 1 FROM generate_series(1, 500) a;
203204CREATE INDEX hash_split_index on hash_split_heap USING HASH (keycol);
204- INSERT INTO hash_split_heap SELECT 1 FROM generate_series(1, 70000) a;
205- VACUUM FULL hash_split_heap;
205+ INSERT INTO hash_split_heap SELECT 1 FROM generate_series(1, 5000) a;
206206-- Let's do a backward scan.
207207BEGIN;
208208SET enable_seqscan = OFF;
@@ -213,11 +213,10 @@ MOVE BACKWARD 10000 FROM c;
213213MOVE BACKWARD ALL FROM c;
214214CLOSE c;
215215END;
216- -- DELETE, INSERT, REBUILD INDEX .
216+ -- DELETE, INSERT, VACUUM .
217217DELETE FROM hash_split_heap WHERE keycol = 1;
218- INSERT INTO hash_split_heap SELECT a/2 FROM generate_series(1, 50000 ) a;
218+ INSERT INTO hash_split_heap SELECT a/2 FROM generate_series(1, 25000 ) a;
219219VACUUM hash_split_heap;
220- REINDEX INDEX hash_split_index;
221220-- Clean up.
222221DROP TABLE hash_split_heap;
223222-- Index on temp table.
Original file line number Diff line number Diff line change @@ -156,10 +156,9 @@ SELECT h.seqno AS f20000
156156-- Cause some overflow insert and splits.
157157--
158158CREATE TABLE hash_split_heap (keycol INT );
159+ INSERT INTO hash_split_heap SELECT 1 FROM generate_series(1 , 500 ) a;
159160CREATE INDEX hash_split_index on hash_split_heap USING HASH (keycol);
160- INSERT INTO hash_split_heap SELECT 1 FROM generate_series(1 , 70000 ) a;
161-
162- VACUUM FULL hash_split_heap;
161+ INSERT INTO hash_split_heap SELECT 1 FROM generate_series(1 , 5000 ) a;
163162
164163-- Let's do a backward scan.
165164BEGIN ;
@@ -173,12 +172,11 @@ MOVE BACKWARD ALL FROM c;
173172CLOSE c;
174173END;
175174
176- -- DELETE, INSERT, REBUILD INDEX .
175+ -- DELETE, INSERT, VACUUM .
177176DELETE FROM hash_split_heap WHERE keycol = 1 ;
178- INSERT INTO hash_split_heap SELECT a/ 2 FROM generate_series(1 , 50000 ) a;
177+ INSERT INTO hash_split_heap SELECT a/ 2 FROM generate_series(1 , 25000 ) a;
179178
180179VACUUM hash_split_heap;
181- REINDEX INDEX hash_split_index;
182180
183181-- Clean up.
184182DROP TABLE hash_split_heap;
You can’t perform that action at this time.
0 commit comments