Home / Companies / Cockroach Labs / Blog / Post Details
Content Deep Dive

Forward Indexes on JSON columns

Blog post from Cockroach Labs

Post Details
Company
Date Published
Author
Shivam Saraf
Word Count
3,211
Company Posts That Month
7
Language
English
Hacker News Points
3
Post removed?
No
Summary

During an internship at Cockroach Labs in the winter of 2023, Shivam Saraf worked on implementing forward indexes for JSONB columns, significantly improving query performance by up to 98%. This project aimed to address the challenges of retrieving data efficiently from large tables, a task complicated by the absence of JSONB support in forward indexes. JSONB, a binary storage format for JSON documents, typically uses inverted indexes to facilitate specific data searches. However, the lack of a defined lexicographical order for JSONB had previously hindered the development of forward indexes. Saraf's work involved establishing semantic ordering rules and encoding strategies for JSONB data, allowing it to be forward indexable and enabling efficient ORDER BY operations on JSON columns. By leveraging these enhancements, query execution times were drastically reduced, showcasing the potential of forward indexes to optimize database performance.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.