Topic

#SQL

27 posts tagged “SQL”.

The Lycoris Team The Lycoris Team · · 6 min read

How to Read a Postgres EXPLAIN ANALYZE Query Plan

A step-by-step guide to running EXPLAIN ANALYZE in PostgreSQL and reading the query plan it returns — node types, costs, and where the real time went.

#Databases #SQL #Performance
The Lycoris Team The Lycoris Team · · 5 min read

What Is a Database Trigger?

A database trigger is a procedure that runs automatically on an insert, update, or delete — enforcing rules the application layer can't guarantee.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 5 min read

Postgres Index Types: B-Tree vs GIN vs GiST

Postgres offers several index types beyond the default B-tree. When GIN and GiST outperform it for arrays, JSONB, full-text search, and ranges.

#Databases #SQL #Performance
The Lycoris Team The Lycoris Team · · 5 min read

What Is a Covering Index?

A covering index holds every column a query needs, letting the database answer from the index alone without a lookup back to the table.

#Databases #SQL #Performance
The Lycoris Team The Lycoris Team · · 4 min read

Primary Key vs Foreign Key vs Unique Constraint

Primary keys identify a row, foreign keys link one table to another, and unique constraints just prevent duplicates. How the three differ in SQL.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 4 min read

Database Deadlocks Explained: Causes and Prevention

A database deadlock happens when two transactions each wait on a lock the other holds. Why deadlocks occur, how databases detect them, and how to avoid them.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 4 min read

How Database Query Optimizers Work

A query optimizer turns declarative SQL into an execution plan by estimating the cost of alternative strategies. How that estimation works and how to read a plan.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 5 min read

What Is SQLite? The Database Inside Your App

SQLite is a serverless, file-based SQL database compiled directly into an application. How it works, why it's everywhere, and when to reach for it.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 5 min read

What Is a Read Replica? Database Scaling Explained

A read replica is a synced copy of a database that serves read queries, taking load off the primary. How replication lag and failover actually work.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 4 min read

What Is a CTE? Common Table Expressions Explained

A CTE is a named, temporary result set defined with WITH that you can reference elsewhere in a SQL query. How they work and when to use one.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 4 min read

Optimistic vs Pessimistic Locking in Databases

Optimistic locking checks for conflicts at write time; pessimistic locking blocks other writers up front. How each works and when to pick one.

#Databases #Backend #SQL
The Lycoris Team The Lycoris Team · · 4 min read

What Is Write-Ahead Logging (WAL)?

Write-ahead logging records changes to a log before applying them to a database, making crash recovery and replication possible. Here's how it works.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 5 min read

The N+1 Query Problem and How to Fix It

The N+1 query problem turns one database request into hundreds by issuing a separate query per row. Here's how to spot it and fix it.

#Databases #SQL #Performance
The Lycoris Team The Lycoris Team · · 4 min read

OLTP vs OLAP: Two Very Different Ways to Query Data

OLTP systems handle many small, fast transactions like orders and logins; OLAP systems run large analytical queries across historical data for reporting.

#Databases #SQL #Backend
Chisato Chisato · · 4 min read

SQL Window Functions Explained (With Examples)

SQL window functions compute values across a set of rows without collapsing them, unlike GROUP BY. How OVER, PARTITION BY, and ranking work.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 4 min read

ACID Transactions Explained: Database Guarantees

ACID — atomicity, consistency, isolation, durability — defines the guarantees a database transaction makes so concurrent, failure-prone operations stay correct.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 4 min read

What Is Database Normalization? A Practical Guide

Database normalization organizes tables to eliminate redundant data and update anomalies. The normal forms explained with a worked example.

#Databases #SQL #Backend
The Lycoris Team The Lycoris Team · · 4 min read

What Is Database Indexing? Faster Queries, Explained

A database index is a sorted data structure that lets the engine find rows without scanning the whole table. How indexes work, and when they help or hurt.

#Databases #SQL #Performance

← All topics