Organizing large child tables & indexes for quick seeking - Mailing list pgsql-admin

From Wells Oliver
Subject Organizing large child tables & indexes for quick seeking
Date
Msg-id CAOC+FBUOxb-HpYVinF8ZtnH8jCXv+b2Mn4h8r8YsXfrh_GbSTQ@mail.gmail.com
Whole thread Raw
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Table's REPLICATE IDENTITY : where is it kept?
Next
From: Nelson Gonzaga
Date:
Subject: Grant on lo_export()