ferraro.sql

database engineer

Your slow query, explained.

See the statements →Booking database reviews from February

Lucía Ferraro·Database engineer

explain analyze
pg_stat_statements

Before and after

Eight queries and systems I've tuned. Each bar is the mean time per call, log-scaled, before and after.

Orders dashboard
Query tuning

Orders dashboard

Tienda Austral

A covering index and a rewritten window query for the busiest page in the admin.

1,800 ms → 24 ms
2025
Warehouse migration
Migration

Warehouse migration

Mercado Sur

Nightly reports moved from a cron of views to incremental materialisation.

14 min → 40 s
2024
Sharding by tenant
Scale-out

Sharding by tenant

Kuntur SaaS

Citus-style tenant sharding with zero-downtime moves for 4,000 tenants.

620 ms → 35 ms
2023
Search index
Full-text

Search index

Biblio

Trigram and tsvector indexes with ranking instead of LIKE '%…%'.

2.4 s → 90 ms
2022
Reporting cube
Analytics

Reporting cube

Pampa Energía

Pre-aggregated rollups and BRIN indexes on a 3 TB time series.

9 min → 18 s
2021
Bloat clean-up
Operations

Bloat clean-up

Tienda Austral

Autovacuum tuning and online repacking of a 900 GB table.

480 ms → 60 ms
2020
Geo queries
PostGIS

Geo queries

Rutas

GiST indexes and a tiling strategy for delivery-zone lookups.

3.1 s → 45 ms
2019
Event store
Schema design

Event store

Kuntur SaaS

An append-only event schema with partitioning by month.

250 ms → 8 ms
2018
services

What I tune

Postgres, mostly — plus the warehouses, queues and caches around it. Remote, with overlap for the Americas and Europe.

Query review

Fixed · €3,900 — Your top 20 statements explained, fixed and benchmarked.

Indexing strategy

From · €5k — The indexes you need and the ones costing you writes.

Schema & migrations

From · €9k — Designs that age well and moves with zero downtime.

Operations health

Monthly · €1,600 — Vacuum, bloat, replication and capacity watched for you.

how I work

One transaction at a time

  1. Snapshot

    pg_stat_statements, logs and plans for a week of real traffic.

  2. Explain

    The ten most expensive statements, each with a plan and a hypothesis.

  3. Change safely

    Indexes built concurrently, migrations in steps, every change reversible.

  4. Commit

    Before/after numbers, a runbook and alerts so it stays fast.

Lucía Ferraro
Lucía Ferraro · Database engineer
about

Fast databases are boring databases.

I'm Lucía, a database engineer in Buenos Aires. I've spent ten years inside Postgres for shops, utilities and SaaS companies — tuning queries, designing schemas and running migrations nobody noticed.

I read query plans the way other people read novels. I prefer one good index to three clever caches, and every change I make comes with a before-and-after.

PostgreSQLPostGISCitusClickHousepgbouncer
10 yrsinside Postgres
75×best query speed-up
0downtime migrations
code review

In their own words

Our dashboard went from coffee-break slow to instant. Lucía explained every step.
Martín DíazCTO, Tienda Austral
We sharded four thousand tenants and not one noticed.
Sofía PazVP engineering, Kuntur
The nightly report that used to take fourteen minutes now finishes before I open it.
Diego HerreraHead of data, Mercado Sur
clients

Databases I've tuned

  • Tienda Austral
  • Mercado Sur
  • Kuntur SaaS
  • Biblio
  • Pampa Energía
  • Rutas
  • Andes Bank
  • Patagonia Labs

talks & awards

2025Reading plans like a plannerTalk · PGConf Latin America
2024Zero-downtime everythingTalk · Nerdearla
2023PostgreSQL contributorRelease notes, 16 and 17
2015Best thesis, databasesUniversidad de Buenos Aires
contact

Send me your EXPLAIN

Paste a slow query or describe the pain. I reply within a day, often with a first idea.

Based in
Buenos Aires, Argentina · remote
Phone
+54 11 0000 0004
Local time
· local
Elsewhere
InstagramBehanceDribbbleLinkedIn
I'd like
Start

Made withSitesfareReport