November 2019
Beginner to intermediate
470 pages
11h 59m
English
First, we will take a closer look at the outdated method of partitioning data. Keep in mind that understanding this technique is important to gain a deeper overview of what PostgreSQL really does behind the scenes.
Before digging deeper into the advantages of partitioning, I want to show you how partitions can be created. The entire thing starts with a parent table that we can create by using the following command:
test=# CREATE TABLE t_data (id serial, t date, payload text);CREATE TABLE
In this example, the parent table has three columns. The date column will be used for partitioning, but we'll cover more on that a bit later.
Now that the parent table is in place, the child tables can be created. This is how it works: ...