Posts / Tags / postgresql
Tag · 14 articles

#postgresql

Articles

How to Use PostgreSQL for Data Normalization

↗ External

Data normalization in PostgreSQL, written with Timescale. Normal forms, when to denormalize instead, and how TimescaleDB changes the tradeoffs.

PostgreSQL Databases TimescaleDB

Recursive Query in SQL: What It Is, and How to Write One

↗ External

As developers, querying in PostgreSQL for hierarchical data is difficult. SQL is a declarative programming language, but our brains are trained to think imperatively. Recursive queries using Common Ta…

PostgreSQL Databases TimescaleDB

Understanding SQL Aggregate Functions

↗ External

You may have heard that 'data is the new oil.' By itself, data is unrefined and not valuable, but given processing and refinement, it becomes precious. We gain insights into our products, applications…

PostgreSQL Databases TimescaleDB

Understanding Foreign Keys in PostgreSQL

↗ External

Foreign keys in PostgreSQL are a fundamental way of defining relationships between tables. Splitting data across multiple tables is foundational to relational databases and data normalization. However…

PostgreSQL Databases TimescaleDB

Explaining PostgreSQL EXPLAIN

↗ External

How to read PostgreSQL EXPLAIN output: the plan, operations, row counts, and timing, and using it to figure out why a query is slow.

PostgreSQL Databases TimescaleDB

PostgreSQL Security Guide

↗ External

A PostgreSQL security guide written with Timescale. What to lock down, why it matters, and the ways attackers get in when you don't.

PostgreSQL Databases TimescaleDB

How to Use a Common Table Expression (CTE) in SQL

↗ External

Common Table Expressions (CTEs) are my go-to tool when writing complex SQL queries. They can be thought of as working like sub-queries or temporary tables but with their own superpowers.

PostgreSQL Databases TimescaleDB

Understanding PostgreSQL Tablespaces

↗ External

Tablespaces are a PostgreSQL feature that gets easily overlooked but can provide substantial speed improvements and cost-saving potential. As our database grows, tablespaces become a powerful tool in…

PostgreSQL Databases TimescaleDB

How to Design Your PostgreSQL Database: Two Schema Examples

↗ External

How we design and lay out our tables is one of the most important decisions in developing effective and efficient PostgreSQL databases. A database schema is the architecture or structure of the data i…

PostgreSQL Databases TimescaleDB

Creating a Fast Time-Series Graph With Postgres Materialized Views

↗ External

Fast time-series graphs in PostgreSQL, written with Timescale. Using materialized views and continuous aggregates for real-time analytics.

PostgreSQL Databases TimescaleDB

Easily Generate Mock Data with PostgreSQL

Using PostgreSQL's generate_series function to spin up mock data: integer sequences, date ranges, and time-series data for testing and demos.

PostgreSQL SQL Data Generation

Wrangling Table Bloat in Large PostgreSQL Tables

↗ External

Tackling table bloat on large PostgreSQL tables, written with Timescale. Spotting bloat, tuning VACUUM and AutoVacuum, and partitioning with chunks.

PostgreSQL Databases TimescaleDB

How to Reduce Your PostgreSQL Database Size

↗ External

Shrinking a PostgreSQL database, written with Timescale. Pages and tuples, how bloat accumulates, routine vacuums, compression, and retention policies.

PostgreSQL Databases TimescaleDB

Postgres: The Graph Database You Didn't Know You Had

You don't need Neo4j for graph data. Walking through nodes, edges, and recursive traversals in plain Postgres, with working SQL.

PostgreSQL Databases Data Structures