Skip to content
Why Database Indexes on JSON Fields Fail in Production episode artwork

EPISODE · Jun 26, 2026 · 6 MIN

Why Database Indexes on JSON Fields Fail in Production

from Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations · host Fexingo

Lucas and Luna dig into a subtle database pitfall: indexing JSON fields inside Postgres and MySQL. They walk through a real production case where a developer added a GIN index on a JSONB column, only to find query times actually increased for certain lookup patterns. The problem: JSON indexes don't behave like simple B-tree indexes; they store the entire JSON structure, and queries that don't use the right operators or that touch only a few keys can still trigger full scans. Lucas explains the difference between GIN and B-tree indexes, the role of JSON path operators, and why the query planner sometimes chooses a sequential scan even with an index present. Luna brings up a practical example from an e-commerce catalog where millions of rows with JSON attributes caused mysterious slowdowns. They also discuss alternatives: extracted generated columns, partial indexes, and when it's better to normalize the JSON keys into separate columns. The takeaway: JSON indexes can help, but only if you understand the query patterns and index types involved. Otherwise, they add overhead without benefit. #JSONIndexing #PostgreSQL #MySQL #GIN #BTree #QueryOptimization #DatabasePerformance #IndexDesign #GeneratedColumns #PartialIndex #Normalization #Ecommerce #ProductionDebug #Technology #DataEngineering #FexingoBusiness #BusinessPodcast #DatabaseTech Keep every episode free: buymeacoffee.com/fexingo

Episode metadata supplied by the publisher feed · Published Jun 26, 2026

Embed this episode

Ready to play

Why Database Indexes on JSON Fields Fail in Production

0:00 6:58

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations?

This episode is 6 minutes long.

When was this Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations episode published?

This episode was published on June 26, 2026.

Can I download this Database Tech with Fexingo: SQL, NoSQL, and Data Storage Conversations episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!