Trong môi trường có sẵn một index đã hoạt động hiệu quả, việc thêm index mới lại khiến Postgres lựa chọn kế hoạch xử lý kém hiệu quả hơn, loại bỏ gần nửa triệu hàng chỉ để trả về kết quả 10 hàng. Nguyên nhân kỹ thuật nằm ở cơ chế chọn index của Postgres khi cost-based optimizer không tính toán chính xác chi phí của từng kế hoạch, dẫn đến việc chọn wrong index. Hệ quả là query performance giảm nghiêm trọng khi hệ thống phải xử lý lượng dữ liệu lớn hơn nhiều so với cần thiết. Bài viết cung cấp ví dụ cụ thể về cách monitor và điều chỉnh configuration parameters như random_page_cost để giúp Postgres đưa ra quyết định chọn index chính xác hơn. Lập trình viên nên đọc bài để hiểu rõ hành vi của Postgres query planner và tránh các trap khi làm việc với indexes trong production environment.
AI summaries can be wrong. Read the original before relying on anything important.
Why read it: Bài viết giúp bạn hiểu và giải quyết vấn đề PostgreSQL chọn sai index gây lãng phí tài nguyên.
Answer 3 short questions to earn reward points for this article. Only do it if you want the points.
3 questions · under a minute · optional
Source: https://milanjovanovic.tech/blog/when-postgres-picks-the-wrong-index. 8 Sync News only summarizes and links out; content copyright belongs to the authors and original sources.
Read the news here, practice coding, follow structured courses and train for IELTS on our sibling products — all connected through one 8 Sync account.
The ecosystem home: product overviews, blog and full pricing.
ExploreLearn along a clear roadmap: videos, auto-graded quizzes, certificates and mentors who ship for a living.
View the roadmap1,000 DSA problems in Vietnamese, auto-graded across 7 languages — many FREE, right in your browser.
Practice for freeAI grading for all four IELTS skills with detailed rubric feedback.
Try it freeA 22 MB AI IDE for Vietnamese devs.
Download freeOrganizational memory for AI agents.
ExploreAI that staffs your Fanpage and qualifies leads for you.
Try itMariaDB introduces four new tools to Enterprise Platform 2027 including AI Retrieval and Semantic Cache to streamline database agent development and reduce costs.
ClickHouse 26.10 introduces function composition, more flexible joins, faster GROUP BY queries, disk spilling for IN subqueries, an experimental columns cache, and Freeform and SQLite formats.
OccupySaaS is a protest movement in code: laid-off developers building clean-room, open-source, drop-in replacements for the SaaS giants. First up: ZeroAuthy (Auth0) and SalesCompel (Salesforce).
Upgrade each node in place with pg_upgrade --link. The downtime belongs to one node, not to your users. A PostgreSQL 17 to 18 walkthrough on a Spock cluster.
If you have certain lines of code that repeat over and over again in a project, there's a pretty standard solution for it: using a function. But what about when you have the same project file setup th
Benchmarking a vector index at billion-scale means tracking P99/P99.9 latency, Recall@K, QPS at a fixed recall target, index build time, RSS memory, and CPU usage, since averages hide failures. The team used three datasets for different jobs: SIFT-1B (128-d) to test raw scale, LAION-100M (768-d CLIP floats) to test real float behavior, and a self-built BookCorpus-10M (4096-d, via Llama 2) to approximate LLM-scale embeddings. Building BookCorpus-10M took 16 hours on five GPUs at about 173 vectors/sec, producing 164 GB that restores via cbbackupmgr in 2-3 minutes. Partition elimination, tagging vectors with a key like category_id, let a 10-partition layout skip 90% of the work per query, tightening P99 tail latency and raising throughput per core.
Bối cảnh triển khai AI mà không có bước review rủi ro giống như thiếu một WHERE clause trong SQL có thể dẫn đến đêm dài khắc phục sự cố. Nguyên nhân kỹ thuật nằm ở việc các model AI có thể tạo ra dữ liệu không mong muốn khi không có bộ lọc phù hợp. Hệ quả có thể rất nghiêm trọng khi hệ thống AI vô tình tạo ra nội dung độc hại, sai lệch hoặc vi phạm chính sách. Đáng học hỏi là bài nhấn mạnh việc xác định rõ vị trí của cơ chế "phanh" (brake) trong hệ thống AI và ai chịu trách nhiệm kiểm soát nó.
Bài viết này giải thích tại sao thiếu bước kiểm duyệt trong AI sản xuất có thể dẫn đến hậu quả nghiêm trọng như lỗi query SQL không có WHERE clause.
plMail là một email client mã nguồn mở miễn phí cho phép quản lý Gmail, Outlook và các tài khoản IMAP trong một hộp thư duy nhất tự host. Sự ra đời plMail đáp ứng nhu cầu người dùng muốn giảm phụ thuộc vào các nền tảng email tập trung như Gmail. Phía kỹ thuật, dự án dựa trên Next.js và Node.js, cung cấp trải nghiệm người dùng hiện đại với khả năng tùy chỉnh cao. Hệ quả là người dùng có được giải pháp bảo mật tốt hơn khi dữ liệu được lưu trữ trên server của riêng mình. Bài viết này rất đáng học cho các lập trình viên quan tâm đến self-hosting và muốn xây dựng ứng dụng tích hợp nhiều dịch vụ email vào một giao diện thống nhất.
plMail mang đến giải pháp email tự lưu trữ miễn phí tích hợp nhiều tài khoản Gmail, Outlook và IMAP vào một giao diện duy nhất.
Loading comments…