Organizing large child tables & indexes for quick seeking

Поиск
Список
Период
Сортировка
От Wells Oliver
Тема Organizing large child tables & indexes for quick seeking
Дата
Msg-id CAOC+FBUOxb-HpYVinF8ZtnH8jCXv+b2Mn4h8r8YsXfrh_GbSTQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-admin
I have a parent table which at the moment has 140 child tables, each partitioned by year and week (named table_yr2018_wk25, etc). Each child table has something like 80-100m rows. 

Querying from the parent table can be a hit or miss operation: sometimes the planner does a sequence scan over each child table and its millions of rows (which of course never completes) and sometimes it uses an index: I have an index on each child table which is comprised of 5 columns, including week and year.

The PK on the parent table is a uuid.

Any tips here for ensuring a faster seek to the appropriate child table? Should I make an index that just has week/year?

--

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Table's REPLICATE IDENTITY : where is it kept?
Следующее
От: Nelson Gonzaga
Дата:
Сообщение: Grant on lo_export()