title

text

Nikolay Samokhvalov
Nikolay Samokhvalov Nombox LLC
: December
180 мин

Seamless SQL optimization, v2.0

There are two types of SQL query analysis:

  1. "Macro": analyzing the workload as a whole (three major approaches: using metrics provided by pg_stat_statements or similar, log analysis with pgBadger or similar, and sampling of pg_stat_activity)

  2. "Micro": diving into details of single query execution (EXPLAIN command being the central tool here)

And there are huge gaps between them that become noticeable at scale. The main challenges:

  • Switching between "macro" and "micro" without a huge overhead
  • Verifying optimization ideas reliably
  • Deploying changes risk-free

Solving these tasks at a scale requires advanced DBA experience and–sometimes–intuition. Or better tools that (fortunately!) very recently started to appear.

In this tutorial, we will learn how to establish a smooth and seamless SQL optimization process in your organization: * what tools should you choose in your particular case? * how to close the gaps mentioned above?

Видео

Другие доклады

  • Ivan Panchenko
    Ivan Panchenko Postgres Professional
    22 мин

    Postgres Pro DBMS: what’s new & what’s on the roadmap

    In this talk, you'll learn about Postgres Pro DBMS from the co-founder of Postgres Professional. Ivan will explain the philosophy behind this enhanced variant of PostgreSQL, reveal the differences between Postgres and Postgres Pro and provide the roadmap for the further evolution of Postgres Pro DBMS.

  • Álvaro Hernández
    Álvaro Hernández OnGres
    180 мин

    Deconstructing Postgres into a Cloud Native Platform

    Is deploying Postgres in Kubernetes just repackaging it into a container? Can’t Postgres leverage the wide range of Cloud-Native software and integrate well with K8s? Join this journey that will cover and demonstrate, with demos running on StackGres:

    • How to structure Postgres into an init-less container, plus several sidecar containers for connection pooling, backups, agents, etc.
    • Defining high level CRDs as the single API to interact with the Postgres operator.
    • Using K8s RBAC for user authentication of a web UI management interface.
    • Using Prometheus for monitoring; bundling a node, Postgres and PgBouncer exporters together.
    • Proxying Postgres traffic through Envoy. Terminate Postgres SSL with an Envoy plugin, that also exports wire protocol metrics to Prometheus.
    • Using Fluentbit to capture Postgres logs and forward them to Fluentd, which stores them on a centralized Postgres database.

    You will be able to follow the session on your own Kubernetes cluster, and go from zero to a Postgres hero on Kubernetes with little effort! Create in minutes your own Postgres-as-a-Service on your Kubernetes.

  • Dmitry Dolgov
    Dmitry Dolgov Zalando SE
    45 мин

    How many engineers does it take to make subscripting work?

    Recently landed in PostgreSQL, jsonb subscripting support doesn't look as exciting as some other improvements around jsonb. But it's user visible changes are only tip of the iceberg. How many people were involved to make it, and what decisions choices were made? How long did it take, and what are the good/bad ideas to promote a patch? These and few other questions will be our targets in this talk.

  • Daniele Varrazzo
    Daniele Varrazzo Codice Lieve
    45 мин

    psycopg3: all the love between Python and PostgreSQL

    Python is today one of the most used programming languages in the world: simple to learn and to use and ready to interface to any known service and protocol. psycopg2 is the most used PostgreSQL driver for Python: it offers good performance and makes the communication between the language and the database as smooth as possible.

    Python has evolved enormously in the past years and its first-class support for async programming is changing the way new programs are written. PostgreSQL has evolved too: a new generation of the driver is needed to make the most of all the features it has to offer.

    psycopg3 is the new generation of the most used Python-PostgreSQL adapter: it offers a familiar interface and smooth upgrade path, but behind the scenes it is engineered to obtain the best performance from the database and the language: async programming, prepared statements, binary parameters.

    psycopg3 is also experimenting with innovative JSONB support and query pipelining! Come and discover the forefront of the research between your most loved language and database!