drop table test;
CREATE TABLE test as (select box(point(x, x),point(x, x)) 
	from generate_series(1,5000000) as x);

CREATE INDEX test_idx ON test USING gist (box);

SET enable_seqscan TO false;
SET enable_bitmapscan TO false;
SET enable_indexscan TO true;
SET enable_indexonlyscan TO true;

select count(box) from test where box && box(point(0,0), point(1000000,1000000));

delete from test where box && box(point(0,0), point(1000000,1000000));

-- This query invokes gistkillitems()
select count(box) from test where box && box(point(0,0), point(1000000,1000000));

-- These queries should work faster with microvacuum
select count(box) from test where box && box(point(0,0), point(1000000,1000000));
select count(box) from test where box && box(point(0,0), point(1000000,1000000));
select count(box) from test where box && box(point(0,0), point(1000000,1000000));
