timescaledb
timescaledb copied to clipboard
Do not perform chunk exclusion twice
Specifically, if we're doing a SELECT and already excluded the chunks that do not match the WHERE clause while expanding the hypertable, don't call the Postgres function that's supposed to do the same -- relation_excluded_by_constraints(). For DELETE/UPDATE, our inheritance expansion code is not invoked, so this optimization does not apply.