<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rag-with-autoscaling-better-performance-with-lower-costs-for-pgvector-uk3txxhtb" -->

---
title: RAG With Autoscaling: Better Performance With Lower...
description: Neon's autoscaling feature (now GA) dynamically scales Postgres instances to handle the high memory and CPU demands of HNSW index builds in pgvector. Building...
canonical: https://daily.dev/posts/rag-with-autoscaling-better-performance-with-lower-costs-for-pgvector-uk3txxhtb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: RAG With Autoscaling: Better Performance With Lower Costs For pgvector | daily.dev
og:description: Neon's autoscaling feature (now GA) dynamically scales Postgres instances to handle the high memory and CPU demands of HNSW index builds in pgvector. Building...
og:url: https://daily.dev/posts/rag-with-autoscaling-better-performance-with-lower-costs-for-pgvector-uk3txxhtb
og:image: https://api.daily.dev/og/posts/uK3TXXHtb.png
og:image:alt: RAG With Autoscaling: Better Performance With Lower Costs For pgvector
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.

# RAG With Autoscaling: Better Performance With Lower Costs For pgvector

**[Neon](https://daily.dev/sources/neontech)** · 4 min read · 0 upvotes · 0 comments

## Summary

Neon's autoscaling feature (now GA) dynamically scales Postgres instances to handle the high memory and CPU demands of HNSW index builds in pgvector. Building an HNSW index on a 1M-row dataset requires ~8GB of maintenance_work_mem and multiple CPUs, but these resources are only needed during infrequent index builds. Neon solves this by scaling up compute units on demand and using disk swaps to extend apparent memory when physical RAM is limited — allowing a ¼ CU instance to 'believe' it has 8GB of memory. After the index build, the instance scales back down, reducing costs while maintaining fast vector similarity search performance (up to 3,000x faster than sequential scans).

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://neon.com/blog/rag-with-autoscaling>

## Similar posts on daily.dev

- [Scale pgvector with binary quantization on Amazon Aurora PostgreSQL](https://daily.dev/posts/scale-pgvector-with-binary-quantization-on-amazon-aurora-postgresql-a9xxlb7je) · AWS Database Blog · 1 upvotes · 0 comments
- [Supercharge pgvector: 4x Faster HNSW with AlloyDB](https://daily.dev/posts/supercharge-pgvector-4x-faster-hnsw-with-alloydb-tkk8hpcfr) · Google Cloud · 0 upvotes · 0 comments
- [The Case Against pgvector](https://daily.dev/posts/the-case-against-pgvector-amqbtam6f) · Hacker News · 3 upvotes · 0 comments
- [When pgvector Starts to Slow Down as Your Vector Table Grows](https://daily.dev/posts/when-pgvector-starts-to-slow-down-as-your-vector-table-grows-b5jeoovpn) · DigitalOcean Community · 0 upvotes · 0 comments
- [The reason your pgvector benchmark is lying to you](https://daily.dev/posts/the-reason-your-pgvector-benchmark-is-lying-to-you-deuqnlu3d) · The New Stack · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/rag-with-autoscaling-better-performance-with-lower-costs-for-pgvector-uk3txxhtb)

```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":"RAG With Autoscaling: Better Performance With Lower Costs For pgvector","url":"https://daily.dev/posts/rag-with-autoscaling-better-performance-with-lower-costs-for-pgvector-uk3txxhtb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/rag-with-autoscaling-better-performance-with-lower-costs-for-pgvector-uk3txxhtb"},"datePublished":"2026-07-09T06:57:59.467Z","dateModified":"2026-07-09T07:05:36.065Z","description":"Neon's autoscaling feature (now GA) dynamically scales Postgres instances to handle the high memory and CPU demands of HNSW index builds in pgvector. Building...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ab478268e72d02e364921f8aec58b035?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ab478268e72d02e364921f8aec58b035?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Neon","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":"Neon","logo":"https://media.daily.dev/image/upload/s--65EDghou--/f_auto/v1724339118/logos/neontech","url":"https://daily.dev/sources/neontech"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/rag-with-autoscaling-better-performance-with-lower-costs-for-pgvector-uk3txxhtb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql,vector-search,pgvector","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Neon","item":"https://daily.dev/sources/neontech"},{"@type":"ListItem","position":3,"name":"RAG With Autoscaling: Better Performance With Lower Costs For pgvector"}]}
```

