{"id":4756,"date":"2018-03-09T12:06:43","date_gmt":"2018-03-09T20:06:43","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=4756"},"modified":"2025-06-13T17:32:48","modified_gmt":"2025-06-14T00:32:48","slug":"new-querying-features-couchbase-server","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/","title":{"rendered":"New Querying Features in Couchbase Server 5.5"},"content":{"rendered":"<div class=\"paragraph\">\n<p>New querying features figure prominently in the latest release of Couchbase Server 5.5. Check out <a href=\"https:\/\/www.couchbase.com\/blog\/announcing-couchbase-server-5-5\/\">the announcement<\/a> and <a href=\"https:\/\/www.couchbase.com\/downloads\/\">download the release for free right now<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>In this post, I want to highlight a few of the new features and show you how to get started using them:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>ANSI JOINs &#8211; N1QL in Couchbase already has JOIN, but now JOIN is more standards compliant and more flexible.<\/li>\n<li>HASH joins &#8211; Performance on certain types of joins can be improved with a HASH join (in Enterprise Edition only)<\/li>\n<li>Aggregate pushdowns &#8211; GROUP BY can be pushed down to the indexer, improving aggregation performance (in Enterprise Edition only)<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p><em>All the examples in this post use the &#8220;travel-sample&#8221; bucket that comes with Couchbase.<\/em><\/p>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_ansi_joins\">ANSI JOINs<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Until Couchbase Server 5.5, JOINs were possible, with two caveats:<\/p>\n<\/div>\n<div class=\"olist arabic\">\n<ol class=\"arabic\">\n<li>One side of the JOIN has to be document key(s)<\/li>\n<li>You must use the <code>ON KEYS<\/code> syntax<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>In Couchbase Server 5.5, it is no longer necessary to use <code>ON KEYS<\/code>, and so writing joins becomes much more natural and more in line with other SQL dialects.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_previous_join_syntax\">Previous JOIN syntax<\/h3>\n<div class=\"paragraph\">\n<p>For example, here\u2019s the old syntax:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">SELECT r.destinationairport, r.sourceairport, r.distance, r.airlineid, a.name\r\nFROM `travel-sample` r\r\nJOIN `travel-sample` a ON KEYS r.airlineid\r\nWHERE r.type = 'route'\r\nAND r.sourceairport = 'CMH'\r\nORDER BY r.distance DESC\r\nLIMIT 10;<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>This will get 10 routes that start at CMH airport, joined with their corresponding airline documents. The result are below (I\u2019m showing them in table view, but it\u2019s still JSON):<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/10201-ansi-join-table-view.png\" alt=\"ANSI join results\" \/><\/span><\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_new_join_syntax\">New JOIN syntax<\/h3>\n<div class=\"paragraph\">\n<p>And here\u2019s the new syntax doing the same thing:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">SELECT r.destinationairport, r.sourceairport, r.distance, r.airlineid, a.name\r\nFROM `travel-sample` r\r\nJOIN `travel-sample` a ON META(a).id = r.airlineid\r\nWHERE r.type = 'route'\r\nAND r.sourceairport = 'CMH'\r\nORDER BY r.distance DESC\r\nLIMIT 10;<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>The only difference is the <code>ON<\/code>. Instead of <code>ON KEYS<\/code>, it\u2019s now <code>ON &lt;field1&gt; = &lt;field2&gt;<\/code>. It\u2019s more natural for those coming from a relational background (like myself).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>But that\u2019s not all. Now you are no longer limited to joining just on document keys. Here\u2019s an example of a <code>JOIN<\/code> on a city field.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">SELECT a.airportname, a.city AS airportCity, h.name AS hotelName, h.city AS hotelCity, h.address AS hotelAddress\r\nFROM `travel-sample` a\r\nINNER JOIN `travel-sample` h ON h.city = a.city\r\nWHERE a.type = 'airport'\r\nAND h.type = 'hotel'\r\nLIMIT 10;<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>This query will show hotels that match airports based on their city.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/10202-ansi-join-on-fields.png\" alt=\"ANSI join on fields\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Note that for this to work, you must have an index created on the field that\u2019s on the inner side of the JOIN. The &#8220;travel-sample&#8221; bucket already contains a predefined index on the city field. If I were to attempt it with other fields, I\u2019d get an error message like &#8220;No index available for ANSI join term\u2026\u200b&#8221;.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>For more information on ANSI JOIN, check out the <a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/join.html\">full N1QL JOIN documentation<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><em>Note: The old JOIN, ON KEYS syntax will still work, so don\u2019t worry about having to update your old code.<\/em><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_hash_joins\">Hash Joins<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Under the covers, there are different ways that joins can be carried out. If you run the query above, Couchbase will use a <strong>Nested Loop (NL)<\/strong> approach to execute the join. However, you can also instruct Couchbase to use a <strong>hash join<\/strong> instead. A hash join can sometimes be more performant than a nested loop. Additionally, a hash join isn\u2019t dependent on an index. It is, however, dependent on the join being an equality join only.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>For instance, in &#8220;travel-sample&#8221;, I could join landmarks to hotels on their email fields. This may not be the best find to find out if a hotel is a landmark, but since email is not indexed by default, it illustrates the point.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">SELECT l.name AS landmarkName, h.name AS hotelName, l.email AS landmarkEmail, h.email AS hotelEmail\r\nFROM `travel-sample` l\r\nINNER JOIN `travel-sample` h ON h.email = l.email\r\nWHERE l.type = 'landmark'\r\nAND h.type = 'hotel';<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>The above query will take a very long time to run, and probably time out.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_syntax\">Syntax<\/h3>\n<div class=\"paragraph\">\n<p>Next I\u2019ll try a hash join, which must be explicitly invoked with a <code>USE HASH<\/code> hint.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">SELECT l.name AS landmarkName, h.name AS hotelName, l.email AS landmarkEmail, h.email AS hotelEmail\r\nFROM `travel-sample` l\r\nINNER JOIN `travel-sample` h USE HASH(BUILD) ON h.email = l.email\r\nWHERE l.type = 'landmark'\r\nAND h.type = 'hotel';<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>A hash join has two sides: a <code>BUILD<\/code> and a <code>PROBE<\/code>. The <code>BUILD<\/code> side of the join will be used to create an in-memory hash table. The <code>PROBE<\/code> side will use that table to find matches and perform the join. Typically, this means you want the <code>BUILD<\/code> side to be used on the smaller of the two sets. However, you can only supply one hash hint, and only to the right side of the join. So if you specify <code>BUILD<\/code> on the right side, then you are implicitly using <code>PROBE<\/code> on the left side (and vice versa).<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_build_and_probe\">BUILD and PROBE<\/h3>\n<div class=\"paragraph\">\n<p>So why did I use <code>HASH(BUILD)<\/code>?<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>I know from using <a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/infer.html\"><code>INFER<\/code><\/a> and\/or <a href=\"https:\/\/docs.couchbase.com\/server\/current\/tools\/query-workbench.html#bucket-analyzer\">Bucket Insights<\/a> that landmarks make up roughly 10% of the data, and hotels make up about 3%. Also, I know from just trying it out that <code>HASH(BUILD)<\/code> was slightly slower. But in either case, the query execution time was milliseconds. Turns out there are two hotel-landmark pairs with the same email address.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/10205-hash-join-results\/\" alt=\"Hash join results\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><code>USE HASH<\/code> will tell Couchbase to <em>attempt<\/em> a hash join. If it cannot do so (or if you are using Couchbase Server Community Edition), it will fall back to a nested-loop. (By the way, you can explicitly specify nested-loop with the <code>USE NL<\/code> syntax, but currently there is no reason to do so).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>For more information, check out the <a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/join.html#use-hash-hint\">HASH join<\/a> areas of the documentation.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_aggregate_pushdowns\">Aggregate pushdowns<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Aggregations in the past have been tricky when it comes to performance. With Couchbase Server 5.5, <em>aggregate pushdowns<\/em> are now supported for <code>SUM, COUNT, MIN, MAX, and AVG<\/code>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>In earlier versions of Couchbase, indexing was not used for statements involving <code>GROUP BY<\/code>. This could severely impact performance, because there is an extra &#8220;grouping&#8221; step that has to take place. In Couchbase Server 5.5, the index service can do the grouping\/aggregation.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_example\">Example<\/h3>\n<div class=\"paragraph\">\n<p>Here\u2019s an example query that finds the total number of hotels, and groups them by country, state, and city.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">SELECT country, state, city, COUNT(1) AS total\r\nFROM `travel-sample`\r\nWHERE type = 'hotel' and country is not null\r\nGROUP BY country, state, city\r\nORDER BY COUNT(1) DESC;<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>The query will execute, and it will return as a result:<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/10203-aggregate-result.png\" alt=\"Aggregation result\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Let\u2019s take a look at the visual query plan (only available in Enterprise Edition, but you can view the raw Plan Text in Community Edition).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/10204-query-plan-no-pushdown.png\" alt=\"Query plan with no pushdown\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Note that the only index being used is for the <code>type<\/code> field. The grouping step is doing the aggregation work. With the relatively small travel-sample data set, this query is taking around ~90ms on my single node desktop. But let\u2019s see what happens if I add an index on the fields that I\u2019m grouping by:<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_indexing\">Indexing<\/h3>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">CREATE INDEX ix_hotelregions ON `travel-sample` (country, state, city) WHERE type='hotel';<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Now, execute the above <code>SELECT<\/code> query again. It should return the same results. But:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>It\u2019s now taking ~7ms on my single node desktop. We\u2019re taking ms, but with a large, more realistic data set, that is a huge difference in magnitude.<\/li>\n<li>The query plan is different.<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/03\/10205-query-plan-with-pushdown.png\" alt=\"Query plan with pushdown\" \/><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Note that this time, there is no &#8216;group&#8217; step. All the work is being pushed down to the index service, which can use the <strong>ix_hotelregions<\/strong> index. It can use this index because my query is exactly matching the fields in the index.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Index push down does not always happen: your query has to meet specific conditions. For more information, check out the <a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/groupby-aggregate-performance.html\">GROUP BY and Aggregate Performance<\/a> areas of the documentation.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_summary\">Summary<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>With <a href=\"https:\/\/www.couchbase.com\/blog\/announcing-couchbase-server-5-5\/\">Couchbase Server 5.5<\/a>, N1QL includes even more standards-compliant syntax and becomes more performant than ever.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Try out N1QL today. You can <a href=\"https:\/\/www.couchbase.com\/downloads\/\">install Enterprise Edition<\/a> or <a href=\"https:\/\/developer.couchbase.com\/tutorials\">try out N1QL right in your browser<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Have a question for me? I\u2019m on <a href=\"https:\/\/twitter.com\/mgroves\">Twitter @mgroves<\/a>. You can also check out <a href=\"https:\/\/twitter.com\/N1QL\">@N1QL on Twitter<\/a>. The <a href=\"https:\/\/www.couchbase.com\/forums\/c\/sql\/16\">N1QL Forum<\/a> is a good place to go if you have in-depth questions about N1QL.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>New querying features figure prominently in the latest release of Couchbase Server 5.5. Check out the announcement and download the release for free right now. In this post, I want to highlight a few of the new features and show [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":4757,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816,1812],"tags":[2258,2173,2041,2182,1759],"ppma_author":[8937],"class_list":["post-4756","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","category-n1ql-query","tag-5-5","tag-aggregates","tag-aggregation","tag-devbuild","tag-hash"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>New Querying Features in Couchbase Server 5.5 - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"New querying features figure prominently in the latest release of Couchbase Server. ANSI JOINs, HASH joins, aggregate pushdowns are covered in this post.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New Querying Features in Couchbase Server 5.5\" \/>\n<meta property=\"og:description\" content=\"New querying features figure prominently in the latest release of Couchbase Server. ANSI JOINs, HASH joins, aggregate pushdowns are covered in this post.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-09T20:06:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T00:32:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1056\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Matthew Groves\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mgroves\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matthew Groves\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/\"},\"author\":{\"name\":\"Matthew Groves\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\"},\"headline\":\"New Querying Features in Couchbase Server 5.5\",\"datePublished\":\"2018-03-09T20:06:43+00:00\",\"dateModified\":\"2025-06-14T00:32:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/\"},\"wordCount\":1124,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg\",\"keywords\":[\"5.5\",\"aggregates\",\"aggregation\",\"devbuild\",\"hash\"],\"articleSection\":[\"Couchbase Server\",\"SQL++ \/ N1QL Query\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/\",\"name\":\"New Querying Features in Couchbase Server 5.5 - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg\",\"datePublished\":\"2018-03-09T20:06:43+00:00\",\"dateModified\":\"2025-06-14T00:32:48+00:00\",\"description\":\"New querying features figure prominently in the latest release of Couchbase Server. ANSI JOINs, HASH joins, aggregate pushdowns are covered in this post.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg\",\"width\":1920,\"height\":1056,\"caption\":\"Question marks, querying from https:\/\/pixabay.com\/en\/question-mark-important-sign-1872665\/\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New Querying Features in Couchbase Server 5.5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\",\"name\":\"Matthew Groves\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"caption\":\"Matthew Groves\"},\"description\":\"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.\",\"sameAs\":[\"https:\/\/crosscuttingconcerns.com\",\"https:\/\/x.com\/mgroves\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/matthew-groves\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"New Querying Features in Couchbase Server 5.5 - The Couchbase Blog","description":"New querying features figure prominently in the latest release of Couchbase Server. ANSI JOINs, HASH joins, aggregate pushdowns are covered in this post.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/","og_locale":"en_US","og_type":"article","og_title":"New Querying Features in Couchbase Server 5.5","og_description":"New querying features figure prominently in the latest release of Couchbase Server. ANSI JOINs, HASH joins, aggregate pushdowns are covered in this post.","og_url":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-03-09T20:06:43+00:00","article_modified_time":"2025-06-14T00:32:48+00:00","og_image":[{"width":1920,"height":1056,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg","type":"image\/jpeg"}],"author":"Matthew Groves","twitter_card":"summary_large_image","twitter_creator":"@mgroves","twitter_misc":{"Written by":"Matthew Groves","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/"},"author":{"name":"Matthew Groves","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58"},"headline":"New Querying Features in Couchbase Server 5.5","datePublished":"2018-03-09T20:06:43+00:00","dateModified":"2025-06-14T00:32:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/"},"wordCount":1124,"commentCount":3,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg","keywords":["5.5","aggregates","aggregation","devbuild","hash"],"articleSection":["Couchbase Server","SQL++ \/ N1QL Query"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/","url":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/","name":"New Querying Features in Couchbase Server 5.5 - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg","datePublished":"2018-03-09T20:06:43+00:00","dateModified":"2025-06-14T00:32:48+00:00","description":"New querying features figure prominently in the latest release of Couchbase Server. ANSI JOINs, HASH joins, aggregate pushdowns are covered in this post.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2018\/03\/102-hero-query.jpg","width":1920,"height":1056,"caption":"Question marks, querying from https:\/\/pixabay.com\/en\/question-mark-important-sign-1872665\/"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/new-querying-features-couchbase-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"New Querying Features in Couchbase Server 5.5"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58","name":"Matthew Groves","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54","url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","caption":"Matthew Groves"},"description":"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.","sameAs":["https:\/\/crosscuttingconcerns.com","https:\/\/x.com\/mgroves"],"url":"https:\/\/www.couchbase.com\/blog\/author\/matthew-groves\/"}]}},"authors":[{"term_id":8937,"user_id":71,"is_guest":0,"slug":"matthew-groves","display_name":"Matthew Groves","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","author_category":"","last_name":"Groves","first_name":"Matthew","job_title":"","user_url":"https:\/\/crosscuttingconcerns.com","description":"Matthew D. Groves is a guy who loves to code.  It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything.  He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s.  He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community.  He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=4756"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4756\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/4757"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=4756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=4756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=4756"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=4756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}