Friction

Pain point · Performance · Blocks work

Date filters cast columns and cause slow queries on Postgres

1 source thread · first seen 2017-01

Summary

The current-date filter wraps the column in a cast, which makes queries run long enough that the read-only replica cancels them; a date-range predicate is far faster.

Affects
Postgres users on read replicas

Evidence

Excerpts are copied word for word from the source; follow the link to read it in full.

“currently our read-only replica cries with the following error because the cast causes the query to run too long”

Report this item