We are pleased to announce the release of Couchbase Server version 4.5.1. This is the first maintenance release in the 4.5.x series, and it includes over 145 stability, performance, and security bug-fixes across the data service, query service, GSI, XDCR, ForestDB and tools.

This release also includes several N1QL enhancements, with a focus on simplified transitioning from RDBMS to NoSQL, and performance.

For additional details on the release:

  • 4.5.1 Release Notes LINK

  • Couchbase 4.5.1 Downloads LINK

  • Couchbase Documentation LINK

New N1QL Enhancements in 4.5.1

4.5.1 is not just like any other maintenance release. Based on customer feedback, we’ve delivered some significant enhancements to N1QL focusing on improving performance, and easing the transitioning from RDBMS to NoSQL.



N1QL pretty setting

For human-computer interactions, pretty setting is useful for readability. But for machine-to-machine interactions, the fewer bytes you send on the wire, the better.

With pretty setting disabled, you get approximately 1/3rd reduction in result size, fewer bytes sent across the network, and improved response time and throughput.

SUFFIXES() function

If you’re a developer building N1QL applications, and need faster string pattern matching — try out the new SUFFIXES function in N1QL. By creating an array index on the SUFFIXES you can reduce the response time of your pattern matching queries. Check out this blog to learn more.


Arrays are one of the most commonly used data types in an app. With N1QL, you can use arrays inside a JSON document to organize your app’s data. ARRAY_INTERSECTION is a new 4.5.1 function, and is an elegant way of finding common items between arrays using N1QL.

For example :

select ARRAY_INTERSECT([“apple”,”orange”,”grapes”,”bananas”], [“apple”,”orange”], [“apple”,”grapes”]);

The result will be [“apple”]

Simplified dynamic object creation

4.5.1 allows you to do derived or on-the-fly construction of a new object using fields and values from another existing object

For example :


{ UPPER(“foo”) : 1, “foo” || “bar” : 2 };

should produce:

{ “FOO” : 1, “foobar” : 2 }

Non-blocking streaming distinct operator

DISTINCT operator scans the input, and emits the distinct values as it progresses, all while consuming less memory, and without sorting of the input.

This significantly improves query performance, if you have a large document set, and are using distinct on an attribute with low cardinality (such as state).

Updating nested array elements

With 4.5.1, you get the expressive power to recursively traverse and conditionally update nested array elements

For example :

UPDATE default
SET s.newField = ‘newValue’ FOR s IN ARRAY_FLATTEN(ARRAY i.subitems FOR i IN items END, 1) END;

We’re looking forward to your feedback on 4.5.1. Keep the Jira Issues, blog posts, and tweets flowing.


Posted by Don Pinto, Principal Product Manager, Couchbase

Don Pinto is a Principal Product Manager at Couchbase and is currently focused on advancing the capabilities of Couchbase Server. He is extremely passionate about data technology, and in the past has authored several articles on Couchbase Server including technical blogs and white papers. Prior to joining Couchbase, Don spent several years at IBM where he maintained the role of software developer in the DB2 information management group and most recently as a program manager on the SQL Server team at Microsoft. Don holds a master's degree in computer science and a bachelor's in computer engineering from the University of Toronto, Canada.

Leave a reply