<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/understanding-the-scann-index-in-alloydb-rm7yfy9cx" -->

---
title: Understanding the SCaNN index in AlloyDB | daily.dev
description: AlloyDB introduces the new ScaNN index, which brings 12 years of Google research and innovation in approximate nearest neighbor algorithms to AlloyDB. The...
canonical: https://daily.dev/posts/understanding-the-scann-index-in-alloydb-rm7yfy9cx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Understanding the SCaNN index in AlloyDB | daily.dev
og:description: AlloyDB introduces the new ScaNN index, which brings 12 years of Google research and innovation in approximate nearest neighbor algorithms to AlloyDB. The...
og:url: https://daily.dev/posts/understanding-the-scann-index-in-alloydb-rm7yfy9cx
og:image: https://api.daily.dev/og/posts/RM7yfY9cX.png
og:image:alt: Understanding the SCaNN index in AlloyDB
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Understanding the SCaNN index in AlloyDB

**[Google Cloud](https://daily.dev/sources/gcp)** · 3 min read · 6 upvotes · 2 comments

## Summary

AlloyDB introduces the new ScaNN index, which brings 12 years of Google research and innovation in approximate nearest neighbor algorithms to AlloyDB. The ScaNN index offers faster vector queries, smaller memory footprint, faster index build times, and higher write throughput compared to the HNSW index in standard PostgreSQL.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://cloud.google.com/blog/products/databases/understanding-the-scann-index-in-alloydb/>

## Community discussion

Top comments from developers on daily.dev.

**@idoshamun** · 0 upvotes

> SCaNN doing its way to AlloyDB is very interesting move by GCP. It's the fastest way to do ANN 😬

**@jameels** · 0 upvotes

> Hey, did some one succeed to run query that use the scann index? I created the index (which took A HUGE TIME to finish!!), and when running any kind of query , it is preferring the full table scan rather than index scan.

---

Tags: [#alloydb](https://daily.dev/tags/alloydb), [#pgvector](https://daily.dev/tags/pgvector), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/understanding-the-scann-index-in-alloydb-rm7yfy9cx)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Understanding the SCaNN index in AlloyDB","url":"https://daily.dev/posts/understanding-the-scann-index-in-alloydb-rm7yfy9cx","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/understanding-the-scann-index-in-alloydb-rm7yfy9cx"},"datePublished":"2024-04-10T16:02:29.597Z","dateModified":"2024-05-24T02:13:22.322Z","description":"AlloyDB introduces the new ScaNN index, which brings 12 years of Google research and innovation in approximate nearest neighbor algorithms to AlloyDB. The...","image":"https://storage.googleapis.com/gweb-cloudblog-publish/original_images/image1_wilWwWl.gif","thumbnailUrl":"https://storage.googleapis.com/gweb-cloudblog-publish/original_images/image1_wilWwWl.gif","isAccessibleForFree":true,"articleSection":"Google Cloud","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Google Cloud","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/gcp","url":"https://daily.dev/sources/gcp"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/understanding-the-scann-index-in-alloydb-rm7yfy9cx","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"alloydb,pgvector,postgresql","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Google Cloud","item":"https://daily.dev/sources/gcp"},{"@type":"ListItem","position":3,"name":"Understanding the SCaNN index in AlloyDB"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/understanding-the-scann-index-in-alloydb-rm7yfy9cx","comment":[{"@type":"Comment","text":"SCaNN doing its way to AlloyDB is very interesting move by GCP. It’s the fastest way to do ANN 😬","datePublished":"2024-04-15T07:52:29.103Z","url":"https://daily.dev/posts/RM7yfY9cX#c-1dkzK77Ei","author":{"@type":"Person","name":"Ido Shamun","url":"https://daily.dev/idoshamun","image":"https://media.daily.dev/image/upload/s---xy_OAwk--/f_auto,q_auto/v1703781380/avatars/avatar_28849d86070e4c099c877ab6837c61f0"}},{"@type":"Comment","text":"Hey, did some one succeed to run query that use the scann index? I created the index (which took A HUGE TIME to finish!!), and when running any kind of query , it is preferring the full table scan rather than index scan.","datePublished":"2024-04-17T14:26:27.981Z","url":"https://daily.dev/posts/RM7yfY9cX#c-2Shkg2Gpt","author":{"@type":"Person","name":"jameel","url":"https://daily.dev/jameels","image":"https://lh3.googleusercontent.com/a/ACg8ocLd1XQfhBEouDPYyLJpVi9ZV2WRN3_3HlItmKCBfB7u5u0zaQ=s96-c"}}]}
```

