The pg_stat_statements PostgreSQL module provides a means for tracking execution statistics of all SQL statements executed by a server.