parent
c4980a90f9
commit
2766bbc83a
3
NEWS.md
3
NEWS.md
@ -1,3 +1,6 @@
|
|||||||
|
0.23.1 (yyyy-mm-dd)
|
||||||
|
* Fix `CDB_EstimateRowCount` parallelizability #333
|
||||||
|
|
||||||
0.23.0 (2018-07-03)
|
0.23.0 (2018-07-03)
|
||||||
* Add a new helper function `_CDB_Table_Exists(table_name_with_optional_schema TEXT)` #332
|
* Add a new helper function `_CDB_Table_Exists(table_name_with_optional_schema TEXT)` #332
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ BEGIN
|
|||||||
EXECUTE Format('ANALYZE %s;', reloid);
|
EXECUTE Format('ANALYZE %s;', reloid);
|
||||||
END IF;
|
END IF;
|
||||||
END
|
END
|
||||||
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL RESTRICTED SECURITY DEFINER;
|
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL UNSAFE SECURITY DEFINER;
|
||||||
|
|
||||||
-- Return a row count estimate of the result of a query using statistics
|
-- Return a row count estimate of the result of a query using statistics
|
||||||
CREATE OR REPLACE FUNCTION CDB_EstimateRowCount(query text)
|
CREATE OR REPLACE FUNCTION CDB_EstimateRowCount(query text)
|
||||||
@ -28,4 +28,4 @@ BEGIN
|
|||||||
EXECUTE 'EXPLAIN (FORMAT JSON) ' || query INTO STRICT plan;
|
EXECUTE 'EXPLAIN (FORMAT JSON) ' || query INTO STRICT plan;
|
||||||
RETURN plan->0->'Plan'->'Plan Rows';
|
RETURN plan->0->'Plan'->'Plan Rows';
|
||||||
END
|
END
|
||||||
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL RESTRICTED;
|
$$ LANGUAGE 'plpgsql' VOLATILE STRICT PARALLEL UNSAFE;
|
||||||
|
Loading…
Reference in New Issue
Block a user