Applying table constraints

What happens if filters are applied?

test=# EXPLAIN SELECT * FROM t_data WHERE t = '2016-01-04';                            QUERY PLAN -----------------------------------------------------------------  Append (cost=0.00..95.12 rows=23 width=40)    -> Seq Scan on t_data (cost=0.00..0.00 rows=1 width=40)          Filter: (t = '2016-01-04'::date)    -> Seq Scan on t_data_2016 (cost=0.00..25.00 rows=6 width=40)          Filter: (t = '2016-01-04'::date)    -> Seq Scan on t_data_2015 (cost=0.00..25.00 rows=6 width=40)          Filter: (t = '2016-01-04'::date)    -> Seq Scan on t_data_2014 (cost=0.00..25.00 rows=6 width=40)          Filter: (t = '2016-01-04'::date)    -> Seq Scan on t_data_2013 (cost=0.00..20.12 rows=4 width=40)          Filter: (t = '2016-01-04'::date) (11 rows) 

PostgreSQL will ...

Get Mastering PostgreSQL 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.