Couchbase has been granted a patent for a document-oriented database system that optimizes query execution plans for untyped data fields. The system generates histograms for different types of data stored in the field and assigns costs to operators based on these histograms. The optimal query execution plan is then generated by selecting operators with the lowest costs. The system can handle scalars, arrays, and objects stored in the untyped data field. GlobalData’s report on Couchbase gives a 360-degree view of the company including its patenting strategy. Buy the report here.

According to GlobalData’s company profile on Couchbase, Content recommendation models was a key innovation area identified from patents. Couchbase's grant share as of September 2023 was 28%. Grant share is based on the ratio of number of grants to total number of patents.

Optimizing queries for untyped data fields in a database

Source: United States Patent and Trademark Office (USPTO). Credit: Couchbase Inc

A recently granted patent (Publication Number: US11709831B2) describes a method for optimizing queries in a database. The method involves storing a collection of documents in the database, where each document includes an array field capable of storing multiple elements. A histogram is generated to describe the distribution of elements within the array field.

When a query statement is received, specifying an expression based on the array field, a cost is assigned to each operator based on the histogram. The costs assigned to the operators are then compared, and a query execution plan is generated based on this comparison. The database is then queried using the generated query execution plan.

The patent also discusses the scenario where the array field stores arrays with elements of different data types. In this case, a multi-histogram is generated by creating individual histograms for each data type within the array field. These histograms are then combined and stored by the database.

The process of generating a histogram for each data type involves receiving a histogram resolution, which indicates the number of histogram bins included in the histogram for that data type. Multiple histogram bins are generated based on the histogram resolution, and these bins are combined to form the histogram for the respective data type.

The patent further describes the determination of costs for operators based on the histogram. This involves identifying the operator and the corresponding filter using elements of the array field. The number of documents from the collection that satisfy the filter is determined using the histogram, and the cost of the operator is calculated based on this number. The cost is then assigned to the operator.

The patent also discusses the storage of an index corresponding to the array field, which includes keys corresponding to elements of the array field in the collection of documents. Index statistics, including the number of unique documents with data values corresponding to the keys, are determined. These statistics are used in the calculation of operator costs.

Overall, this patent presents a method for optimizing queries in a database by utilizing histograms, multi-histograms, and index statistics to assign costs to operators and generate efficient query execution plans.

To know more about GlobalData’s detailed insights on Couchbase, buy the report here.

Data Insights

From

The gold standard of business intelligence.

Blending expert knowledge with cutting-edge technology, GlobalData’s unrivalled proprietary data will enable you to decode what’s happening in your market. You can make better informed decisions and gain a future-proof advantage over your competitors.

GlobalData

GlobalData, the leading provider of industry intelligence, provided the underlying data, research, and analysis used to produce this article.

GlobalData Patent Analytics tracks bibliographic data, legal events data, point in time patent ownerships, and backward and forward citations from global patenting offices. Textual analysis and official patent classifications are used to group patents into key thematic areas and link them to specific companies across the world’s largest industries.