Tag: postgresql
All posts with tag "postgresql".
-
Pg Trgm Trigram Similarity Vs Ilike Laravel: Postgresql Performance Guide
Standard B-tree indexes cannot optimize partial substring searches (e.g., `WHERE name ILIKE '%john%'`), forcing PostgreSQL to perform a full sequential tab...
-
Row Level Security Rls Bypass Laravel: Postgresql Performance Guide
PostgreSQL Row-Level Security (RLS) acts as a database-tier safeguard, ensuring queries only return rows a user is authorized to see regardless of applicat...
-
Slow Query Debugging Explain Analyze: Postgresql Performance Guide
EXPLAIN ANALYZE is PostgreSQL's most powerful diagnostic tool for understanding query execution. Unlike EXPLAIN alone (which shows the planner's estimated...
-
Table Partitioning Large Laravel Apps: Postgresql Performance Guide
Table partitioning splits a large PostgreSQL table into smaller physical sub-tables (partitions) based on a partition key, while presenting a single logica...
-
Eloquent N+1 Query Detection and Automatic Eager Loading: How to Fix
The N+1 query problem occurs when code iterates over a collection of models and accesses a relationship on each one, triggering a separate SQL query per mo...
-
PgBouncer Connection Pooling: Transaction vs Session Mode Guide
Master PgBouncer connection pooling modes. Compare transaction vs session mode performance for Laravel and PostgreSQL. Avoid common database bottlenecks.
-
Beyond Eloquent: Think Like a Database (Laravel + PostgreSQL Performance Part 1)
Eloquent is elegant, but every Laravel developer eventually hits performance walls caused by hidden SQL inefficiencies. This first part explains the mindset shift from imperative PHP to declarative SQL, exposes pitfalls like N+1 and the 'shopping list problem,' and gives a simple first habit: inspect the actual queries your code generates.
-
My Epic Quest to Master PSQL: From 'Show Tables' to Dropping Everything (Accidentally, Of Course)
Dive into a hilarious and deeply practical journey of taming the PSQL command line. This guide takes you from the utter confusion of `psql show tables` to the god-like power of dropping everything (and how not to do it on production). Learn to install, connect, inspect tables, manage users, and master the essential commands that will turn PSQL from a mysterious beast into your most trusted database companion.