SShortSingh.
Back to feed

Why One Team Ditched Its Vector Database and Moved Embeddings Into Postgres

0
·1 views

A development team abandoned a dedicated vector database after a year, despite it being faster on pure nearest-neighbour benchmarks, because real-world queries always combined vector search with metadata filters like user permissions and workspace scope. Dedicated vector stores handle such filtered searches poorly, either discarding their index via pre-filtering or returning incomplete results via post-filtering, forcing the team to over-fetch and make a second round-trip to Postgres anyway. The deeper issue was a dual-write problem: storing embeddings separately from source data meant any failure during the two-step write process could leave vectors stale or orphaned, silently breaking search results or leaking access to deleted content. The team concluded that an embedding is derived data — like a thumbnail from an image — and should live alongside the source record, not in a separate system with its own failure modes. Moving to a single Postgres column with an HNSW index eliminated the sync pipeline, the consistency risks, and the extra infrastructure bill.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

How to Share One Podman Container Across PowerShell and WSL2 Using Podman Desktop

Podman Desktop runs a single Linux VM called podman-machine-default that serves as a shared container engine accessible from both PowerShell and WSL2. This eliminates the resource waste and confusion of running two separate container runtimes, allowing developers to start, inspect, and debug containers from either shell interchangeably. The setup relies on both shells connecting to the same VM over SSH, ensuring consistent port access and a single source of truth for container state. A common pitfall involves Podman Desktop silently reverting the CLI default back to rootful mode through a dialog prompt, overriding manual connection changes. The correct fix is to stop the machine, apply the rootless setting at the machine level using podman machine set --rootful=false, and restart it.

0
ProgrammingDEV Community ·

Developer finds just 24 real organic visitors after bots and bugs skewed site analytics

A developer running a site with 38 free tools discovered that only 24 genuine organic visitors arrived over a 90-day period, despite analytics showing 735 total visitors. Closer examination revealed that hundreds of sessions from China and the US showed a suspiciously perfect 1.00 pageviews-per-visitor ratio, strongly suggesting automated bot traffic rather than real users. A separate bug in the site's server-side analytics code was attributing all unidentified events to a single hardcoded 'anonymous' user, corrupting funnel data for months. The developer also acknowledged that high-traffic tool categories like JSON formatters and JWT decoders are dominated by established incumbents, making organic search gains unlikely regardless of quality improvements. The findings highlight two key lessons: segmenting visitor data by behavior is essential before drawing conclusions, and using a shared fallback identifier in analytics pipelines can silently invalidate large amounts of data.

0
ProgrammingDEV Community ·

A 4-paragraph, sub-200-word cover letter formula built for developer job hunts

A structured cover letter approach aimed at software developers argues that most application letters are discarded early because they fail to quickly prove relevance to the hiring manager. The recommended format consists of four short paragraphs totaling under 200 words, designed to take roughly 25 minutes to complete per application after initial practice. The first paragraph should open with the company's stated goal and a specific past achievement that directly addresses it, replacing generic openers with concrete proof of fit. The second paragraph maps the candidate's experience to the top three job requirements using measurable facts rather than vague skill claims, while the third adds a genuine, specific connection to the company if one exists. The letter closes with a clear call to action and an offer of something concrete, with the advice to omit personal backstory, CV repetition, and self-congratulatory adjectives entirely.

Why One Team Ditched Its Vector Database and Moved Embeddings Into Postgres · ShortSingh