PgConf.Russia 2017 talks

Adaptive query optimization in PostgreSQL

Oleg Ivanov
Postgres Professional, R&D

Oleg Ivanov is R&D in Postgres Professional. He is a winner of Olympiads in Informatics of different complexity. In 2016 he got BSc degree in Lomonosov Moscow State University. His BSc thesis was devoted to applying machine learning for improving query optimization in DBMS.

Query optimization is an important problem, which solution has a great influence on DBMS performance, especially for complex queries. In this talk we consider PostgreSQL query optimizer and specifically cardinality estimation problem for correlated clauses, which is one of the most well-known drawbacks of query optimizers in general. In the talk we propose our solution for this problem which involves machine learning methods and is available for PostgreSQL 9.6 as an extension with a patch. We discuss the experimental evaluation, advantages, disadvantages, and fields of application of the proposed approach as well.