<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sql on Luke Hebert</title><link>https://lukehebert.com/tag/sql/</link><description>Recent content in Sql on Luke Hebert</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 02 Jul 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://lukehebert.com/tag/sql/index.xml" rel="self" type="application/rss+xml"/><item><title>pgBackRest and Helpful Commands</title><link>https://lukehebert.com/post/pgbackrest-and-helpful-commands/</link><pubDate>Wed, 02 Jul 2025 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/pgbackrest-and-helpful-commands/</guid><description>A practical reference for pgBackRest backup, restore, and cleanup commands for PostgreSQL. Covers manual cleanup, incremental backups, retention policies, and stanza management.</description></item><item><title>Graph Database White Papers</title><link>https://lukehebert.com/post/graph-database-white-papers/</link><pubDate>Mon, 14 Apr 2025 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/graph-database-white-papers/</guid><description>An overview of graph databases, their structure, and advantages over relational models. Covers how nodes, relationships, and the Cypher query language work together to model complex data.</description></item><item><title>Postgres per-table autovacuum management</title><link>https://lukehebert.com/post/posgres-per-table-autovacuum-management/</link><pubDate>Mon, 28 Oct 2024 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/posgres-per-table-autovacuum-management/</guid><description>Tune Postgres per-table autovacuum settings and track them with a single SQL view. Covers global defaults, table-specific overrides, and a ready-to-use monitoring query.</description></item><item><title>How to Get the Most Out of Postgres Memory Settings</title><link>https://lukehebert.com/post/how-to-get-the-most-out-of-postgres-memory-settings/</link><pubDate>Wed, 12 Jun 2024 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/how-to-get-the-most-out-of-postgres-memory-settings/</guid><description>A practical guide to tuning Postgres memory parameters including shared_buffers, work_mem, and maintenance_work_mem. Learn how to measure actual usage, avoid out-of-memory crashes, and balance allocations for optimal performance.</description></item><item><title>How to Clean Up pg_wal If the Disk Is Full</title><link>https://lukehebert.com/post/how-to-clean-up-pg-wal-if-the-disk-is-full/</link><pubDate>Mon, 04 Dec 2023 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/how-to-clean-up-pg-wal-if-the-disk-is-full/</guid><description>A practical guide to resolving PostgreSQL pg_wal disk-full issues, covering both reactive recovery steps and proactive measures to prevent recurrence. Learn how to free space, move the WAL directory, and configure archiving correctly.</description></item><item><title>Optimize PostgreSQL Server Performance Through Configuration</title><link>https://lukehebert.com/post/optimize-postgresql-server-performance-through-configuration/</link><pubDate>Thu, 27 Apr 2023 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/optimize-postgresql-server-performance-through-configuration/</guid><description>This guide walks through four key PostgreSQL configuration settings that significantly impact server performance. Learn how to tune shared_buffers, wal_buffers, effective_cache_size, and work_mem for your specific workload.</description></item><item><title>PostgreSQL Shared Memory (Huge Pages)</title><link>https://lukehebert.com/post/postgresql-shared-memory-huge-pages/</link><pubDate>Wed, 26 Apr 2023 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/postgresql-shared-memory-huge-pages/</guid><description>Calculating the right number of Linux huge pages for PostgreSQL is trickier than just dividing shared_buffers by the page size. This walkthrough shows how to use tuned to manage allocation and why you need to round up based on actual memory usage.</description></item><item><title>PostgreSQL WAL Retention and Clean Up pg_archivecleanup</title><link>https://lukehebert.com/post/postgresql-wal-retention-and-clean-up-pg-archivecleanup/</link><pubDate>Fri, 21 Apr 2023 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/postgresql-wal-retention-and-clean-up-pg-archivecleanup/</guid><description>A practical guide to managing PostgreSQL WAL retention using the pg_archivecleanup utility, covering dry-run and delete modes, retention criteria, and a code walkthrough for novice users.</description></item><item><title>Using SQLline to Test JDBC Connectors</title><link>https://lukehebert.com/post/using-sqlline-to-test-jdbc-connectors/</link><pubDate>Thu, 15 Dec 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/using-sqlline-to-test-jdbc-connectors/</guid><description>A practical guide to using SQLline to replicate SQL client behavior when testing JDBC connectors. Covers downloading the tool, setting up the classpath, and connecting to an Azure MySQL instance.</description></item><item><title>Check Database and Optimize Everything (-A = all databases)</title><link>https://lukehebert.com/post/check-database-and-optimize-everything-all-databases/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/check-database-and-optimize-everything-all-databases/</guid><description>A quick reference for running mysqlcheck to verify and optimize MySQL databases, including the -A flag to target every database on the server in one pass.</description></item><item><title>Check MySQL User Permissions</title><link>https://lukehebert.com/post/check-mysql-user-permissions/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/check-mysql-user-permissions/</guid><description>A quick way to inspect what SELECT and UPDATE privileges a MySQL user actually holds, straight from the mysql.user table. Useful when an application is throwing permission errors and you need to confirm what the account can and cannot do.</description></item><item><title>Create Symbols and Resolve Stack (MySQL)</title><link>https://lukehebert.com/post/create-symbols-and-resolve-stack-mysql/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/create-symbols-and-resolve-stack-mysql/</guid><description>Learn how to extract dynamic symbols from the mysqld binary and use them to resolve a crash stack dump into readable function names.</description></item><item><title>Forceing MySQL Logs to File</title><link>https://lukehebert.com/post/force-mysql-logs-to-file/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/force-mysql-logs-to-file/</guid><description>Learn how to configure MySQL&amp;rsquo;s log_output variable to write slow query and general logs to files instead of tables, and why that matters for performance and log management.</description></item><item><title>Galera Cluster Performance</title><link>https://lukehebert.com/post/galera-cluster-performance/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/galera-cluster-performance/</guid><description>Tuning Galera&amp;rsquo;s gcache size and page size can reduce disk I/O during replication and keep write-set lookups in memory. A quick configuration change that pays off on busy clusters.</description></item><item><title>MyISAMchk</title><link>https://lukehebert.com/post/myisamchk/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/myisamchk/</guid><description>A quick reference for repairing corrupted MyISAM index files with myisamchk, including the exact command and what to expect when running it against a database directory.</description></item><item><title>MySQL Fragmentation Levels</title><link>https://lukehebert.com/post/mysql-fragmentation-levels/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/mysql-fragmentation-levels/</guid><description>Learn how to measure InnoDB table fragmentation using information_schema queries and interpret the resulting ratio to decide when a table needs optimization.</description></item><item><title>MySQL General Log</title><link>https://lukehebert.com/post/mysql-general-log/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/mysql-general-log/</guid><description>A quick walkthrough of enabling, configuring, and querying the MySQL general log to capture every statement that hits your server.</description></item><item><title>MySQL Grants</title><link>https://lukehebert.com/post/mysql-grants/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/mysql-grants/</guid><description>A quick reference for viewing and applying MySQL GRANT statements, including the specific privileges needed for routine and view management.</description></item><item><title>MySQL Joins</title><link>https://lukehebert.com/post/mysql-joins/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/mysql-joins/</guid><description>A quick reference for the four types of SQL JOIN operations in MySQL, with plain-language explanations and a simple example for each.</description></item><item><title>Percona Xtradb Recovery</title><link>https://lukehebert.com/post/percona-xtradb-recovery/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/percona-xtradb-recovery/</guid><description>Percona XtraDB Cluster can recover a crashed node and rejoin it to the cluster using an incremental state transfer. This post walks through how GTID-based position recovery works under the hood and what you will see in the error log during the process.</description></item><item><title>Show Global Maximum SQL Connections in Use</title><link>https://lukehebert.com/post/show-global-maximum-sql-connections-in-use/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/show-global-maximum-sql-connections-in-use/</guid><description>A quick MySQL command to check the peak number of simultaneous connections your server has handled, useful for capacity planning and diagnosing connection bottlenecks.</description></item><item><title>User Performance Data on MySQL</title><link>https://lukehebert.com/post/user-performance-data-on-mysql/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/user-performance-data-on-mysql/</guid><description>A quick bash one-liner that pulls per-user CPU time, connection counts, and active session details from MySQL&amp;rsquo;s INFORMATION_SCHEMA and processlist tables.</description></item><item><title>Hive Bundle Logs</title><link>https://lukehebert.com/post/hive-bundle-logs/</link><pubDate>Thu, 19 Aug 2021 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/hive-bundle-logs/</guid><description>Hive bundle logs in a cloud data warehouse are stored under a predictable S3 path. Knowing where to look saves time when troubleshooting query performance or diagnosing failed jobs.</description></item><item><title>MySQL Key Constraints (FK) by Database</title><link>https://lukehebert.com/post/mysql-key-constraints-fk-by-db/</link><pubDate>Tue, 27 Jun 2017 00:00:00 +0000</pubDate><guid>https://lukehebert.com/post/mysql-key-constraints-fk-by-db/</guid><description>A quick reference for querying MySQL information_schema to list all foreign key constraints in a given database, including the referencing and referenced columns.</description></item></channel></rss>