Posts
PostgreSQL Query Planning Settings Query Guide
Mar 20, 2026 / · 5 min read · postgresql database administration sql queries configuration query planning performance tuning pg_settings postgres dba pg_stat_activity pg_stat_statements pg_stat_user_tables ·PostgreSQL Query Planning Settings Query Guide This PostgreSQL query retrieves all query tuning and statistics collection settings from the pg_settings system view. These parameters control how the query planner selects execution strategies, estimates costs, and collects runtime statistics. Purpose and Overview The …
Read MorePostgreSQL Replication Settings Query Guide
Mar 19, 2026 / · 5 min read · postgresql database administration sql queries replication configuration high availability pg_settings postgres dba ·PostgreSQL Replication Settings Query Guide This PostgreSQL query retrieves all replication-related configuration settings from the pg_settings system view. These parameters control streaming replication, logical replication, standby server behaviour, and WAL sender configuration. Purpose and Overview Replication is …
Read MorePostgreSQL Resource Settings Query Guide
Mar 18, 2026 / · 5 min read · postgresql database administration sql queries configuration performance tuning resource management pg_settings postgres dba pg_stat_database ·PostgreSQL Resource Settings Query Guide This PostgreSQL query retrieves all resource usage configuration settings from the pg_settings system view. Resource settings control how PostgreSQL allocates memory, disk, and CPU resources across queries, background processes, and maintenance operations. Purpose and Overview …
Read MorePostgreSQL SSL Settings Query Guide
Mar 17, 2026 / · 4 min read · postgresql database administration sql queries security ssl configuration pg_settings postgres dba pg_stat_ssl ·PostgreSQL SSL Settings Query Guide This PostgreSQL query retrieves all SSL and TLS configuration settings from the pg_settings system view. It surfaces whether SSL is enabled, which certificates and keys are in use, what cipher suites are allowed, and all other SSL-related parameters. Purpose and Overview Encrypting …
Read MorePostgreSQL Statistics Settings Query Guide This PostgreSQL query retrieves all statistics collection configuration settings from the pg_settings system view. These parameters control what runtime data PostgreSQL collects about query execution, table activity, and performance, feeding into the pg_stat_* monitoring …
Read MorePostgreSQL WAL Settings Query Guide
Mar 16, 2026 / · 6 min read · postgresql database administration sql queries configuration wal durability pg_settings postgres dba ·PostgreSQL WAL Settings Query Guide This PostgreSQL query retrieves all Write-Ahead Log (WAL) configuration settings from the pg_settings system view. WAL settings control durability, crash recovery, checkpointing, archiving, and replication log generation. Purpose and Overview The Write-Ahead Log is the foundation of …
Read MoreList PostgreSQL Tables by Size with SQL
Mar 15, 2026 / · 5 min read · postgresql database administration sql queries storage performance tuning pg_class postgres dba information_schema pg_indexes pg_namespace pg_stat_user_indexes pg_stat_user_tables ·List PostgreSQL Tables by Size with SQL This PostgreSQL query lists all tables in the current database sorted by their total size, largest first. It uses pg_total_relation_size() to include the table data, indexes, TOAST storage, and free space map in the size calculation. Purpose and Overview Disk space pressure is a …
Read MorePostgreSQL Table Row Count Estimates with SQL
Mar 14, 2026 / · 4 min read · postgresql database administration sql queries performance tuning statistics pg_stat_user_tables postgres dba pg_class pg_namespace information_schema ·PostgreSQL Table Row Count Estimates with SQL This PostgreSQL query returns estimated row counts for all user tables, sorted by the largest tables first. It reads from the statistics collector rather than scanning the tables, making it near-instant even on tables with billions of rows. Purpose and Overview Counting …
Read MoreMonitor PostgreSQL Memory Settings with pg_settings
Sep 10, 2025 / · 3 min read · postgresql database administration memory management system monitoring performance tuning sql queries database configuration pg_settings ·PostgreSQL Memory Settings Query: Monitor Database Memory Configuration This PostgreSQL query helps database administrators monitor and analyze memory-related configuration settings in their database instance. By querying the pg_settings system catalog view, you can quickly identify current memory parameters, their …
Read MorePostgreSQL Logging Configuration Query via pg_settings
Sep 9, 2025 / · 3 min read · postgresql database administration logging monitoring sql queries database configuration system settings performance tuning pg_settings ·PostgreSQL Logging Configuration Query - Monitor Database Settings This PostgreSQL query provides database administrators with essential insights into logging configuration parameters by querying the pg_settings system view. The query specifically targets logging-related settings while filtering out WAL (Write-Ahead …
Read More