mirror of https://github.com/citusdata/citus.git
Merge pull request #5246 from citusdata/col/no-index-only
commit
74d9d2a718
|
@ -344,6 +344,13 @@ ColumnarGetRelationInfoHook(PlannerInfo *root, Oid relationObjectId,
|
|||
{
|
||||
/* disable parallel query */
|
||||
rel->rel_parallel_workers = 0;
|
||||
|
||||
/* disable index-only scan */
|
||||
IndexOptInfo *indexOptInfo = NULL;
|
||||
foreach_ptr(indexOptInfo, rel->indexlist)
|
||||
{
|
||||
memset(indexOptInfo->canreturn, false, indexOptInfo->ncolumns);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ EXPLAIN (COSTS OFF) SELECT * FROM columnar_table WHERE a=6456;
|
|||
EXPLAIN (COSTS OFF) SELECT a FROM columnar_table WHERE a=6456;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Index Only Scan using columnar_table_a_idx on columnar_table
|
||||
Index Scan using columnar_table_a_idx on columnar_table
|
||||
Index Cond: (a = 6456)
|
||||
(2 rows)
|
||||
|
||||
|
@ -185,7 +185,7 @@ EXPLAIN (COSTS OFF) SELECT b FROM columnar_table WHERE b = 30000;
|
|||
EXPLAIN (COSTS OFF) SELECT b FROM columnar_table WHERE b = 30001;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Index Only Scan using columnar_table_b_idx on columnar_table
|
||||
Index Scan using columnar_table_b_idx on columnar_table
|
||||
Index Cond: (b = 30001)
|
||||
(2 rows)
|
||||
|
||||
|
@ -345,7 +345,7 @@ DROP INDEX unique_a;
|
|||
EXPLAIN (COSTS OFF) SELECT b FROM include_test WHERE a = 500;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Index Only Scan using unique_a_include_b_c_d on include_test
|
||||
Index Scan using unique_a_include_b_c_d on include_test
|
||||
Index Cond: (a = 500)
|
||||
(2 rows)
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ LIMIT 100;
|
|||
-> GroupAggregate
|
||||
Group Key: full_correlated_1.a
|
||||
Filter: (count(DISTINCT full_correlated_1.a) >= 1)
|
||||
-> Index Only Scan Backward using full_correlated_btree on full_correlated full_correlated_1
|
||||
-> Index Scan Backward using full_correlated_btree on full_correlated full_correlated_1
|
||||
Index Cond: (a > 10)
|
||||
-> Materialize
|
||||
-> Subquery Scan on sub_3
|
||||
|
@ -504,16 +504,6 @@ $$
|
|||
t
|
||||
(1 row)
|
||||
|
||||
SELECT columnar_test_helpers.uses_index_scan (
|
||||
$$
|
||||
SELECT a FROM full_anti_correlated WHERE a>2000 AND a<7000 AND b='24';
|
||||
$$
|
||||
);
|
||||
uses_index_scan
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT columnar_test_helpers.uses_custom_scan (
|
||||
$$
|
||||
SELECT a FROM full_anti_correlated WHERE a<7000 AND b<'10000';
|
||||
|
@ -612,10 +602,9 @@ EXPLAIN (analyze on, costs off, timing off, summary off)
|
|||
SELECT * FROM uncorrelated WHERE x = 78910;
|
||||
QUERY PLAN
|
||||
---------------------------------------------------------------------
|
||||
Index Only Scan using uncorrelated_idx on uncorrelated (actual rows=1 loops=1)
|
||||
Index Scan using uncorrelated_idx on uncorrelated (actual rows=1 loops=1)
|
||||
Index Cond: (x = 78910)
|
||||
Heap Fetches: 1
|
||||
(3 rows)
|
||||
(2 rows)
|
||||
|
||||
SELECT * FROM uncorrelated WHERE x = 78910;
|
||||
x
|
||||
|
|
|
@ -293,12 +293,6 @@ SELECT a FROM full_anti_correlated WHERE a>2000 AND a<7000;
|
|||
$$
|
||||
);
|
||||
|
||||
SELECT columnar_test_helpers.uses_index_scan (
|
||||
$$
|
||||
SELECT a FROM full_anti_correlated WHERE a>2000 AND a<7000 AND b='24';
|
||||
$$
|
||||
);
|
||||
|
||||
SELECT columnar_test_helpers.uses_custom_scan (
|
||||
$$
|
||||
SELECT a FROM full_anti_correlated WHERE a<7000 AND b<'10000';
|
||||
|
|
Loading…
Reference in New Issue