Postgres scales … when you do this!

Опубликовано: 18 Сентябрь 2024
на канале: Supabase
4k
174

Partitioning Tables can greatly improve the efficiency of your Postgres queries by drastically reducing the size of the result set being processed. In this video, Jon Meyers demonstrates how to refactor a giant multi-tenant table into much smaller, individual partitions.

Partitioning tables:

Table partitioning in Postgres is a powerful database feature that allows large tables to be divided into smaller, more manageable pieces called partitions. Each partition can be accessed and managed independently, improving query performance and simplifying maintenance. Partitions can be created based on various criteria, such as range, list, or hash, enabling efficient organization of data. By filtering queries to search within specific partitions, database operations become faster and more efficient. This technique is particularly useful for handling large datasets, optimizing resource usage, and enhancing overall database performance.

00:00 When you need Table Partitions
02:19 Creating a Partitioned Table by List of values
03:39 Creating Partitions for each unique value
04:42 Querying partitioned tables
06:21 Maintaining partitions as data changes
08:36 Querying across multiple partitions
09:18 Combining Indexes with Partitioned Tables

Videos to watch next:
▶ Make your queries 43,240x faster:
▶ The FASTEST possible way to query data:
▶ Simple trick to make your queries WAY more efficient:

Learn more about Supabase

Website:
Get started:
Docs:

Subscribe for more tutorials and feature updates from Supabase:

Connect with Us:
Github:
Discord:
Twitter:
▶ Instagram (follow for memes):


ABOUT SUPABASE:
Supabase is the open source Firebase alternative. Supabase provides a full Postgres database for every project with pgvector, backups, realtime, and more. Add and manage email and password, passwordless, OAuth, and mobile logins to your project through a suite of identity providers and APIs.

Build in a weekend, scale to millions.