Timescale Enhances PostgreSQL for AI with New Open-Source Extensions

06 Jul 2024

Innovations Driving AI Application Performance and Developer Productivity

Two new open-source extensions from Timescale are set to revolutionize PostgreSQL for AI applications, unlocking large-scale, high-performance AI use cases previously only achievable with specialized vector databases like Pinecone. The first extension, pgvectorscale, enables developers to build more scalable AI applications with higher performance embedding search and cost-efficient storage. Complementing the popular open-source extension pgvector, pgvectorscale introduces two key innovations: a StreamingDiskANN index (adapted from Microsoft research) and Statistical Binary Quantization (developed by Timescale researchers, improving on standard Binary Quantization techniques).

Timescale’s benchmarks reveal that with pgvectorscale, PostgreSQL achieves 28x lower p95 latency and 16x higher query throughput compared to Pinecone for approximate nearest neighbor queries at 99% recall. Unlike pgvector, which is written in C, pgvectorscale is developed in the Rust programming language, offering the PostgreSQL community a new avenue for contributing to vector support.

The second extension, pgai, brings more AI workflows to PostgreSQL, making it easier for developers to build search and retrieval augmented generation (RAG) applications. The initial release supports creating OpenAI embeddings and obtaining OpenAI chat completions from models like GPT4o directly within PostgreSQL. This integration allows for classification, summarization, and data enrichment tasks on existing relational data, streamlining the development process from proof of concept to production.

“Pgvectorscale and pgai are incredibly exciting for building AI applications with PostgreSQL. Having embedding functions directly within the database is a huge bonus,” states Web Begole, CTO of Market Reader, a company using Timescale’s cloud PostgreSQL offering to build an AI-enabled financial information platform. “Previously, updating our saved embeddings was a tedious task, but now, with everything integrated, it promises to be much simpler and more efficient. This will save us a significant amount of time and effort.”

“Pgvectorscale and pgai are great additions to the PostgreSQL AI ecosystem. The introduction of Statistical Binary Quantization promises lightning performance for vector search and will be valuable as we scale our vector workload,” said John McBride, Head of Infrastructure at OpenSauced, a company building an AI-enabled analytics platform for open-source projects using Timescale’s cloud PostgreSQL offering. “Pgai removes the need for developers to re-implement common functionality themselves, and I’m excited for the use cases it enables.”

Challenging the Need for Standalone Specialized Vector Databases

The primary advantage of dedicated vector databases like Pinecone has been their performance, coming from purpose-built architectures and algorithms for storing and searching large volumes of vector data. However, Timescale’s pgvectorscale challenges this notion by bringing such specialized architectures and algorithms to PostgreSQL in the form of an extension, helping the popular general-purpose database deliver comparable and often superior performance than specialized vector databases.

According to Timescale’s benchmarks, which involved querying a dataset of 50 million Cohere embeddings (768 dimension), PostgreSQL outperforms Pinecone’s storage optimized index (s1) with 28x lower p95 latency and 16x higher query throughput for approximate nearest neighbor queries at 99% recall. Furthermore, PostgreSQL with pgvectorscale achieves 1.4x lower p95 latency and 1.5x higher query throughput compared to Pinecone’s performance optimized index (p2) at 90% recall on the same dataset.

The cost benefits are equally compelling.

uTorrent

uTorrent

Latest update uTorrent download for free for Windows PC or Android mobile

5
1032 reviews
4942564
downloads
Zona

Zona

Latest update Zona download for free for Windows PC or Android mobile

4
614 reviews
826117
downloads
Minecraft

Minecraft

Latest update Minecraft download for free for Windows PC or Android mobile

5
750 reviews
418144
downloads
Geometry Dash

Geometry Dash

Latest update Geometry Dash download for free for Windows PC or Android mobile

4
539 reviews
304375
downloads

Microsoft's Potential Handheld Gaming Plans Spark Interest

Speculation grows over a Microsoft device as a potential handheld competitor to the Steam Deck, potentially unveiled at the Xbox Games Showcase.

Read more

Hellslave RPG Available Free on Steam For Limited Time

The dark fantasy RPG Hellslave is now free on Steam, as its sequel approaches. Experience this dungeon-crawler and retain it in your library forever. Claim it by June 16.

Read more

Foxtail Unveils Hidden Gem from Comiket 81 in Gaming History

A mysterious disc titled Action RPG (Temp) C81 Demo Version reveals a rarely seen game from Comiket 81 in 2011, featuring unique stamina-based combat. The demo offers a glimpse into a creative era of RPGs, thanks to the dedicated work of developer Foxtail.

Read more

IO Interactive Unveils New James Bond Game: First Light

IO Interactive announces 007 First Light, a new video game featuring an original James Bond origin story. Players will earn their 00 status in this immersive gaming experience crafted for a fresh perspective within the Bond series.

Read more

Anvil Empires Aims to Revolutionize Medieval RTS Gaming

Anvil Empires, a medieval RTS game inspired by Age of Empires 2, offers a large-scale playtest. It combines classic strategy mechanics with MMO elements, allowing up to 1,000 players per server. The focus is on logistics and teamwork.

Read more

Atomic Heart Game Offers Up to 71% Off Sale This Year

Atomic Heart, a distinctive shooter set in a robot-dystopia, is on sale with a 71% discount. Experience the narrative of rebellion against an authoritarian regime as P-3. With elemental powers and melee combat, it promises a unique adventure at $21.09 / £15.49.

Read more

IO Interactive Reveals James Bond Game 007 First Light

IO Interactive announces 007 First Light, a new James Bond game. The long-awaited origin story adds to the Bond franchise's gaming legacy. Fans eagerly await the full reveal, marking IO Interactive's first major step since 2020.

Read more

Nightreign Patch Improves Gameplay for Singleplayer Mode

The Nightreign patch adds auto-resurrect and boosts levelling, addressing challenges in singleplayer mode. Players now experience improved balance and performance, aligning with FromSoftware's commitment to refining gameplay.

Read more

Elden Ring Patch Enhances Solo Gameplay Dynamics

Elden Ring receives a solo gameplay boost with the Nightreign patch. The update introduces automatic revival and improved rewards, enhancing gamers' experiences.

Read more

Medal of Honor Game Reimagined with Unreal Engine 5

The classic Medal of Honor Allied Assault is reimagined using Unreal Engine 5, receiving praise from original game designer Nathan Silvers. The remake highlights the enduring legacy of the game, despite the uncertain future of the Medal series.

Read more