Partitioned Table ... Querying whole Hypertable results in Seq Scans,but Querying a Sub-hypertable Results in Index Scan

Поиск
Список
Период
Сортировка
От Stephen Froehlich
Тема Partitioned Table ... Querying whole Hypertable results in Seq Scans,but Querying a Sub-hypertable Results in Index Scan
Дата
Msg-id CY1PR0601MB1927C0180C1FAF8F3B65E73EE5EC0@CY1PR0601MB1927.namprd06.prod.outlook.com
обсуждение исходный текст
Список pgsql-novice

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

 

В списке pgsql-novice по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: R: Re: create subscription, connection string, password in lognot hide
Следующее
От: "ferraresso@tin.it"
Дата:
Сообщение: R: Re: R: Re: create subscription, connection string, password inlog not hide