Open to Work: Senior Backend & Distributed Systems Engineer (Go / Python) View LinkedIn →

Database

Technical Journal // Database
Jul '26

Couchbase Index Best Practices and Query Performance Tuning

A practical field guide to Couchbase indexing. Covers primary vs GSI indexes, composite key ordering, index-order sorting, covering and partial indexes, array indexes (including replacing OR and LIKE), IntersectScan and UnionScan avoidance, replication and partitioning, projection selectivity, the ADVISE and INFER tools, scan consistency, and pagination, all with runnable SQL++ (N1QL) examples against the travel-sample dataset.

Jul '26

Cache-Driven Development: Saving Your Database From Itself

How to use cache to prevent your database from getting hammered. Understanding cache mechanics, types, strategies, and when each one wins.

Jul '26

How Multi-Tenant SaaS Actually Works

A complete system design of Relay, a multi-tenant AI API gateway. Covers multi-tenant database architecture (silo vs pool vs bridge), API key authentication, provider routing with failover, dual-layer rate limiting, token-based billing, response caching, row-level security, tenant provisioning, and observability. Full Postgres schemas, mermaid diagrams, and Go snippets included.

May '26

Just About Go Time

A breakdown of the absolute absurdity of human time, monotonic clocks in Go, and the one true way to store time across PostgreSQL, Couchbase, and mobile clients.

May '26

PostgreSQL Migrations in Go: Production Schema Patterns with Goose

Execute transactional SQL migrations in Go using Goose. Covers lock avoidance, rollback safety, version tracking, and embedding migration SQL in Go binaries.

Mar '26

ClickHouse data masking with regex

Ingesting PII is easy; cleaning it up is hard. Here is how to use ClickHouse's data masking policies and regex to redact sensitive logs in flight without killing your query performance.

Mar '26

ClickHouse vs. Postgres: When to Move Your Logs Out of a Relational DB

Postgres is the swiss-army knife of databases, but when you hit the 10-million row mark for write-heavy logs, the relational wall becomes real. Here is why we moved our observability stack to ClickHouse.

Jan '26

Can ClickHouse Replace Vector Databases? HNSW, Benchmarks & SQL Setup

Can ClickHouse replace dedicated vector databases like Pinecone, Weaviate, or Milvus? Explore HNSW indexing, vector similarity search performance, and how to store embeddings with SQL in ClickHouse.

Jan '26

OLTP vs OLAP - Why You Need Two Databases

"The database that runs your app cannot be the database that analyzes your app". It's a hard lesson learned at scale. Early on, Postgres does it all. But as you hit massive scale, your analytics queries start killing your login APIs. This post breaks down the physics of Row-oriented (Couchbase) vs Column-oriented (ClickHouse) databases, and how to bridge them using Change Data Capture (CDC) for a robust, lag-free architecture.

Dec '25

Introducing CouchLens: A Query Analysis Tool for Couchbase

CouchLens is a browser-based tool for analyzing Couchbase N1QL query performance. It parses system tables, extracts execution plans, and generates insights to help database administrators find performance bottlenecks without sending data to external servers. This post explains what it does, how to use it, and what features are coming.