慣性聚合 高效追蹤和閱讀你感興趣的部落格、新聞、科技資訊
閱讀原文 在慣性聚合中打開

推薦訂閱源

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python)
AI-原生資料庫 SynapCores SQLv2 與 PostgreSQL
Luis M · 2026-05-24 · via DEV Community

Luis M

SynapCores SQLv2 與 PostgreSQL: 數據庫系統的演變

人工智慧數據庫革命

我們在 SynapCores 中建立了窗口函數(LAG、LEAD、RANK 等),這讓我們思考我們從傳統數據庫(如 PostgreSQL)走了多遠。

以下是 SynapCores 的獨特之處:


從一開始就是 AI 原生

PostgreSQL + pgvector 方法:

-- Need extensions, custom operators, separate indexing
CREATE EXTENSION vector;
CREATE INDEX ON products USING ivfflat (embedding vector_cosine_ops);
SELECT * FROM products
ORDER BY embedding <-> '[0.1, 0.2, ...]'::vector
LIMIT 10;

進入全螢幕模式 離開全螢幕模式

SynapCores 方法:

-- Built-in, no extensions needed
SELECT * FROM products
WHERE COSINE_SIMILARITY(embedding, EMBED('wireless headphones')) > 0.7
ORDER BY similarity DESC;

進入全螢幕模式 離開全螢幕模式

區別何在?純正 SQL 中的原生嵌入生成和向量搜尋.


時間序列分析

PostgreSQL:

-- Complex window functions, manual partitioning
SELECT product_id, date, sales,
       LAG(sales, 1) OVER (PARTITION BY product_id ORDER BY date) as prev_sales,
       LAG(sales, 7) OVER (PARTITION BY product_id ORDER BY date) as week_ago
FROM sales_data;

進入全螢幕模式 退出全螢幕模式

SynapCores:

-- Same syntax, but with ML-powered forecasting
SELECT product_id, date, sales,
       LAG(sales, 1) OVER (PARTITION BY product_id ORDER BY date) as prev_sales,
       PREDICT(sales, 7) OVER (PARTITION BY product_id ORDER BY date) as forecast
FROM sales_data;

進入全螢幕模式 退出全螢幕模式

PREDICT() 作為視窗函數?是。這就是整合 SQL 和 ML 的力量.


意義搜尋

PostgreSQL + 全文搜尋:

-- Keyword matching, not semantic understanding
SELECT * FROM documents
WHERE to_tsvector('english', content) @@ to_tsquery('database & performance');

進入全螢幕模式 退出全螢幕模式

SynapCores:

-- Understands meaning, not just keywords
SELECT * FROM documents
WHERE COSINE_SIMILARITY(
    EMBED(content),
    EMBED('How do I make my database faster?')
) > 0.8;

進入全螢幕模式 離開全螢幕模式

它知道「讓它更快」= 「效能」且「我的資料庫」= 「資料庫系統」。 真正的語義理解.


真正的差異

PostgreSQL 是一個非凡的資料庫。我們不是與它競爭——我們正在為不同的時代建設。

PostgreSQL 是為了以下目的而建立的:

  • 交易型工作負載
  • 複雜的 JOINs
  • ACID 保證
  • 擴充性

SynapCores 是為了以下目的而建立的:

  • 以上所有,以及
  • 原生向量運算
  • 嵌入式機器學習模型
  • 語意理解
  • 人工智能分析

這為何重要

在2025年,每個應用程式都需要:

  1. 向量搜尋 (用於RAG、推薦、相似度)
  2. 嵌入式 (用於語義理解)
  3. 時間序列 (用於預測、異常檢測)
  4. 傳統SQL(供商業邏輯使用)

使用 PostgreSQL,您需要:

  • pgvector 扩展
  • 獨立嵌入服務 (OpenAI API, 本地模型)
  • TimescaleDB for time series
  • 客製化機器學習流程
  • 複雜的協調

使用 SynapCores,您只需要寫 SQL。就是這麼簡單。


真實例子:電商搜尋

PostgreSQL 方法:

# 1. Generate embeddings (external service)
embedding = openai.Embedding.create(input="wireless headphones")

# 2. Query with pgvector
results = db.execute("""
    SELECT * FROM products
    ORDER BY embedding <-> %s::vector
    LIMIT 10
""", [embedding])

# 3. Re-rank with business logic
# 4. Filter out-of-stock
# 5. Apply personalization

進入全螢幕模式 離開全螢幕模式

SynapCores 方法:

-- One query, all in SQL
SELECT
    product_name,
    COSINE_SIMILARITY(embedding, EMBED('wireless headphones')) as relevance,
    PREDICT(will_purchase, user_id, product_id) as purchase_probability
FROM products
WHERE in_stock = true
  AND relevance > 0.7
ORDER BY purchase_probability DESC
LIMIT 10;

進入全螢幕模式 離開全螢幕模式

嵌入生成、向量搜尋和機器學習預測—全部在單一查詢中。


表現

"但這不是比 PostgreSQL 慢嗎?"

事實上,並非如此。因為:

  1. 沒有網絡往返到外部嵌入服務
  2. 原生向量索引 (HNSW) 針對相似性搜索進行優化
  3. 查詢優化理解 ML 運算
  4. 單一查詢計劃 = 更好的緩存利用

我們已經看到 比 PostgreSQL + pgvector + 外部嵌入式向量處理器在向量工作負載上快 3-5 倍


結論

PostgreSQL 在 90 年代和 2000 年代革新了資料庫。

SynapCores 正為 AI 時代做出同樣的革新。

這不是要取代 PostgreSQL—這是為開發者提供為 2025 年而非 1996 年打造的工具。


請自行體驗

這是一個你可以執行的實際查詢:

-- Find products similar to what a user searched for
SELECT
    p.product_name,
    p.price,
    COSINE_SIMILARITY(p.embedding, EMBED(:search_query)) as similarity
FROM products p
WHERE similarity > 0.7
  AND p.category IN (
    SELECT category FROM user_preferences WHERE user_id = :user_id
  )
ORDER BY similarity DESC
LIMIT 20;

進入全螢幕模式 離開全螢幕模式

試著在 PostgreSQL 中無需多個外部服務迴圈就完成這件事。


功能比較表

功能 PostgreSQL SynapCores
SQL 標準 完全支援 完全支援
ACID交易
向量搜尋 擴充 (pgvector) 原生
嵌入生成 外部服務 原生 (EMBED())
機器學習預測 外部服務 原生 (預測())
語意搜尋 關鍵字基礎 真正語意
時間序列 擴展 (TimescaleDB) 原生
自動機器學習 外部服務 原生 (建立實驗)
多模態數據 手動流程 原生 (圖片、音訊、影片)
OCR/字幕 外部服務 原生函數

文件版本: 1.0
最後更新: 2025年12月
網站: https://synapcores.com


最初發布於synapcores.com — SynapCores 是一個免費、單二進制的原生人工智能數據庫(向量 + 圖形 + SQL + 大語言模型)。