Table range partitioning

Returning to the dellstore2 example database used in Chapter 10, Query Optimization, consider the structure of the orders table:

dellstore2=# \d orders; Table "public.orders" Column | Type | Modifiers -------------+---------------+-------------------------------- orderid | integer | not null default nextval('orders_orderid_seq'::regclass) orderdate | date | not null customerid | integer | netamount | numeric(12,2) | not null tax | numeric(12,2) | not null totalamount | numeric(12,2) | not null Indexes: "orders_pkey" PRIMARY KEY, btree (orderid) "ix_order_custid" btree (customerid) Foreign-key constraints: "fk_customerid" FOREIGN KEY (customerid) REFERENCES customers(customerid) ON DELETE SET NULL Referenced by: TABLE ...

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.