Talk

Don't Blame the ORM: Advanced Indexing in PostgreSQL

Saturday, May 30

14:40 - 15:25
RoomLasagna
LanguageEnglish
Audience levelIntermediate
Elevator pitch

Developers often fear databases and treat them like blackboxes, but no more! In this talk I present advanced indexing techniques using special B-Tree index features, Hash indexes and BRIN indexes in PostgreSQL. We’ll develop a small app and troubleshoot real performance problems using indexes.

Abstract

Indexes are extremely powerful and ORMs like Django and SQLAlchemy provide many ways of using them to make queries faster and more efficient. However, developers who are not familiar with the different features and index types in PostgreSQL can end up choosing the wrong type of index. This can result in sub-par performance and increased storage and maintenance costs!

In the talk I will demonstrate the advantages and disadvantages of different indexes in PostgreSQL such as partial, covering and function based B-Tree indexes, as well as lesser known index types such as Hash and Block Range (BRIN) index. To make it as realistic as possible we’ll optimize different use-cases in a Django app using different index types. By the end of this talk you’ll understand how the different types of indexes work, when to use them, and how.

TagsDatabases, Data Engineering, Performance and scalability techniques
Participant

Haki Benita

Software developer and a technical lead. I take special interest in databases, web development, software design and performance tuning.