I reduced the search time on 900k items in db from 55.567 ms to 0.051 ms (How i did this ?)
Jeolardo
0:00 / 0:00
I reduced the search time on 900k items in db from 55.567 ms to 0.051 ms (How i did this ?)
156 просмотров · 4 дня назад
Jeolardo
148 подписчиков
156 просмотров · 4 дня назад
I had 900K+ products in PostgreSQL, and searching for a product by SKU was using a Sequential Scan.
In this video, I show how I used a B-tree index on the SKU column to change the query execution plan and reduce the search time.
I also use EXPLAIN ANALYZE to compare the query before and after the index and see what PostgreSQL is actually doing under the hood.
Topics:
PostgreSQL indexes
B-tree indexes
Sequential Scan vs Index Scan
EXPLAIN ANALYZE
Query performance
Database optimization
PostgreSQL performance
Don't forget to follow me
LinkedIn: / abdelkader-ould-hennia
Twitter: https://x.com/Kader_1680
GitHub: https://github.com/Kader1680