Discussion:
Partitioned Table ... Querying whole Hypertable results in Seq Scans, but Querying a Sub-hypertable Results in Index Scan
Stephen Froehlich
2018-01-22 18:53:10 UTC
Permalink
I have a 2-level partitioned table where the first partition is on one range variable and the second on an list that simply ranges from 1 to 5.

When I query the whole hypertable on a nice, small subset, the planner resorts to sequential scans (on the "seven_lima[date]tango_seven2" tables), making the query untenably long to work with:
https://explain.depesz.com/s/inM4

However, when I query one level down, the scan of the primary table (papa) is a nice, proper, quite fast Index Scan
https://explain.depesz.com/s/8JQ4

What is going on here, and how can I fix it?
________________________________
Stephen Froehlich
Sr. Strategist, CableLabs(r)

***@cablelabs.com<mailto:***@cablelabs.com>
Tel: +1 (303) 661-3708

Loading...