SET enable_indexscan=ON;
SET enable_bitmapscan=OFF;
explain (costs off) SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh';
- QUERY PLAN
--------------------------------------------------------
- Aggregate
- -> Index Scan using wowidx on test_tsvector
- Index Cond: (a @@ '''wr'' | ''qh'''::tsquery)
-(3 rows)
+ QUERY PLAN
+-------------------------------------------------------------------
+ Finalize Aggregate
+ -> Remote Subquery Scan on all (datanode_1,datanode_2)
+ -> Partial Aggregate
+ -> Index Scan using wowidx on test_tsvector
+ Index Cond: (a @@ '''wr'' | ''qh'''::tsquery)
+(5 rows)
SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh';
count
SET enable_indexscan=OFF;
SET enable_bitmapscan=ON;
explain (costs off) SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh';
- QUERY PLAN
--------------------------------------------------------------
- Aggregate
- -> Bitmap Heap Scan on test_tsvector
- Recheck Cond: (a @@ '''wr'' | ''qh'''::tsquery)
- -> Bitmap Index Scan on wowidx
- Index Cond: (a @@ '''wr'' | ''qh'''::tsquery)
-(5 rows)
+ QUERY PLAN
+-------------------------------------------------------------------------
+ Finalize Aggregate
+ -> Remote Subquery Scan on all (datanode_1,datanode_2)
+ -> Partial Aggregate
+ -> Bitmap Heap Scan on test_tsvector
+ Recheck Cond: (a @@ '''wr'' | ''qh'''::tsquery)
+ -> Bitmap Index Scan on wowidx
+ Index Cond: (a @@ '''wr'' | ''qh'''::tsquery)
+(7 rows)
SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh';
count
SET enable_seqscan=OFF;
-- GIN only supports bitmapscan, so no need to test plain indexscan
explain (costs off) SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh';
- QUERY PLAN
--------------------------------------------------------------
- Aggregate
- -> Bitmap Heap Scan on test_tsvector
- Recheck Cond: (a @@ '''wr'' | ''qh'''::tsquery)
- -> Bitmap Index Scan on wowidx
- Index Cond: (a @@ '''wr'' | ''qh'''::tsquery)
-(5 rows)
+ QUERY PLAN
+-------------------------------------------------------------------------
+ Finalize Aggregate
+ -> Remote Subquery Scan on all (datanode_1,datanode_2)
+ -> Partial Aggregate
+ -> Bitmap Heap Scan on test_tsvector
+ Recheck Cond: (a @@ '''wr'' | ''qh'''::tsquery)
+ -> Bitmap Index Scan on wowidx
+ Index Cond: (a @@ '''wr'' | ''qh'''::tsquery)
+(7 rows)
SELECT count(*) FROM test_tsvector WHERE a @@ 'wr|qh';
count