Home / Companies / Couchbase / Blog / Post Details
Content Deep Dive

Using Covering Indexes on a Multiple Document Type Bucket

Blog post from Couchbase

Post Details
Company
Date Published
Author
Nic Raboy, Developer Advocate, Couchbase
Word Count
662
Company Posts That Month
32
Language
English
Hacker News Points
-
Post removed?
No
Summary

In an effort to optimize slow N1QL queries on Couchbase Server 4.1, the author shares their experience of enhancing an internal Java application's performance hosted on a low-budget Amazon EC2 instance. Initially, the queries were sluggish due to reliance on a generic primary index. To improve query performance, the author implemented a covering index specifically tailored to the query's needs, targeting the "date" and "type" properties, but noticed no performance change initially. After running an "EXPLAIN" command, it was revealed that the primary index was still being used because not all documents contained the necessary properties. By revising the query to check for the presence of these properties, the author successfully utilized the covering index, resulting in a significant performance boost.

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.