PostgreSQL: Tracking statistics of SQL planning and execution (pg_stat_statements)

This documentation is part of the Getting started guide. View the full guide here: How to get started with PostgreSQL.

👋 Welcome to the Stackhero documentation!

Stackhero provides a fully managed PostgreSQL cloud service, designed for reliability and speed:

  • Unlimited connections and data transfers for seamless scaling.
  • PgAdmin web UI included for intuitive database management.
  • Popular extensions included, such as PostGIS, TimescaleDB, and PgVector.
  • Simple, one-click updates keep your database secure and current.
  • High performance and strong security on private, dedicated infrastructure.

You can get started with Stackhero's PostgreSQL cloud hosting in just a few minutes. Enjoy a reliable database experience and save valuable time managing your data.

To enable support for pg_stat_statements, first enable it in your PostgreSQL configuration via the Stackhero dashboard. Then, enable the extension for your current database by running:

CREATE EXTENSION pg_stat_statements;

For more information, please refer to the PostgreSQL official documentation.