Skip to content

Pigsty Blog Articles

  • Efficient Administrative Region Lookup with PostGIS

    In PostgreSQL

    PostgreSQLPG-DevelopmentGIS

    Featured Image for Efficient Administrative Region Lookup with PostGIS

    How to efficiently solve the typical reverse geocoding problem: determining administrative regions based on user coordinates.

    How to efficiently solve the typical reverse geocoding problem: determining administrative regions based on user coordinates.

  • Monitoring Table Size in PostgreSQL

    In PostgreSQL

    PostgreSQLPG-AdminMonitoring

    Featured Image for Monitoring Table Size in PostgreSQL

    Tables in PostgreSQL correspond to many physical files. This article explains how to calculate the actual size of a table in PostgreSQL.

    Tables in PostgreSQL correspond to many physical files. This article explains how to calculate the actual size of a table in PostgreSQL.

  • Consistency: An Overloaded Term

    In Database

    Database

    Featured Image for Consistency: An Overloaded Term

    The term "consistency" is heavily overloaded, representing different concepts in different contexts. For example, the C in ACID and the C in CAP actually refer to different concepts.

    The term "consistency" is heavily overloaded, representing different concepts in different contexts. For example, the C in ACID and the C in CAP actually refer to different concepts.

  • Why Study Database Principles

    In Database

    Database

    Featured Image for Why Study Database Principles

    Those who only know how to code are just programmers; **learn databases well, and you can at least make a living**; but for **excellent** engineers, merely **using** databases is far from enough.

    Those who only know how to code are just programmers; **learn databases well, and you can at least make a living**; but for **excellent** engineers, merely **using** databases is far from enough.

  • PgAdmin Installation and Configuration

    In PostgreSQL

    PostgreSQLPG-AdminTools

    Featured Image for PgAdmin Installation and Configuration

    PgAdmin is a GUI program for managing PostgreSQL, written in Python, but it's quite dated and requires some additional configuration.

    PgAdmin is a GUI program for managing PostgreSQL, written in Python, but it's quite dated and requires some additional configuration.

  • Incident-Report: Uneven Load Avalanche

    In PostgreSQL

    PostgreSQLPG-AdminIncident-Report

    Featured Image for Incident-Report: Uneven Load Avalanche

    Recently there was a perplexing incident where a database had half its data volume and load migrated away, but ended up being overwhelmed due to increased load.

    Recently there was a perplexing incident where a database had half its data volume and load migrated away, but ended up being overwhelmed due to increased load.

  • Bash and psql Tips

    In PostgreSQL

    PostgreSQLPG-AdminTools

    Featured Image for Bash and psql Tips

    Some tips for interacting between PostgreSQL and Bash.

    Some tips for interacting between PostgreSQL and Bash.

  • Implementing Mutual Exclusion Constraints with Exclude

    In PostgreSQL

    PostgreSQLPG-DevelopmentSQL

    Featured Image for Implementing Mutual Exclusion Constraints with Exclude

    Exclude constraint is a PostgreSQL extension that can implement more advanced and sophisticated database constraints.

    Exclude constraint is a PostgreSQL extension that can implement more advanced and sophisticated database constraints.

  • Function Volatility Classification Levels

    In PostgreSQL

    PostgreSQLPG-DevelopmentFunctions

    Featured Image for Function Volatility Classification Levels

    PostgreSQL functions have three volatility levels by default. Proper use can significantly improve performance.

    PostgreSQL functions have three volatility levels by default. Proper use can significantly improve performance.

  • Distinct On: Remove Duplicate Data

    In PostgreSQL

    PostgreSQLPG-DevelopmentSQL

    Featured Image for Distinct On: Remove Duplicate Data

    Use Distinct On extension clause to quickly find records with maximum/minimum values within groups

    Use Distinct On extension clause to quickly find records with maximum/minimum values within groups

Was this page helpful?