Обсуждение: Partitioned Table ... Querying whole Hypertable results in Seq Scans,but Querying a Sub-hypertable Results in Index Scan

Поиск
Список
Период
Сортировка

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®


s.froehlich@cablelabs.com

Tel: +1 (303) 661-3708