Published On May 24, 2024
Indexes can greatly improve the performance of a Postgres database, especially as the size of the tables grow. In this video, Jon Meyers demonstrates how to create an index for a particular column, and use explain analyze to measure the optimization.
Managing Indexes in Postgres: https://supabase.com/docs/guides/data...
By default, Postgres creates a B-Tree index, which makes filtering result sets incredibly performant. The index stores a copy of the column's value, as well as a pointer to the full row, in case the query requires additional data.
00:00 Make your queries 43,240x faster
01:04 A very slow Select query (without index)
02:39 Create an Index
03:09 A super fast Select query (with index)
05:24 Selecting an Index - Postgres Query Planner
07:55 Does the order of where statements matter?
10:28 What happens if multiple indexes are available?
12:13 Why not index every column?
š» Videos to watch next:
ā¶ 8 things you should NEVER do in a Database: Ā Ā Ā ā¢Ā 8Ā thingsĀ youĀ shouldĀ NEVERĀ doĀ inĀ aĀ Dat...Ā Ā
ā¶ FASTEST way to host a Postgres database (2024): Ā Ā Ā ā¢Ā FASTESTĀ wayĀ toĀ hostĀ aĀ PostgresĀ databa...Ā Ā
ā¶ Learn Postgres (playlist): Ā Ā Ā ā¢Ā LearnĀ PostgresĀ Ā
š Learn more about Supabase š
šø Website: https://supabase.com/
š Get started: https://app.supabase.com/
š Docs: https://supabase.com/docs
š Subscribe for more tutorials and feature updates from Supabase: Ā Ā Ā /Ā @supabaseĀ Ā
š± Connect with Us:
š Github: https://www.github.com/supabase
š¬ Discord: https://discord.supabase.com/
š¦ Twitter: Ā Ā /Ā supabaseĀ Ā
ā¶ Instagram (follow for memes): Ā Ā /Ā supabasecomĀ Ā
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.
#Supabase #AppDevelopment #RealtimeApps #DeveloperTools