---
title: "Discussion on \"Bringing AI Context Closer to Users with CockroachDB Table Localities\" | Hashnode"
description: "Discussion on \"Bringing AI Context Closer to Users with CockroachDB Table Localities\". One logical table, each tenant's AI memory homed in their region with REGIONAL BY ROW."
url: "https://hashnode.com/posts/bringing-ai-context-closer-to-users-with-cockroachdb-table-localities/6aece9a441baeaa54dcb90a4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Bringing AI Context Closer to Users with CockroachDB Table Localities](https://saikirankshatriya.hashnode.dev/bringing-ai-context-closer-to-users-with-cockroachdb-table-localities?utm_source=hashnode&utm_medium=feed)

One logical table, each tenant's AI memory homed in their region with REGIONAL BY ROW.

3d ago · 18 min read · saikirankshatriya.hashnode.dev  
Read the article

-   [#cockroachdb](https://hashnode.com/tag/cockroachdb)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#vector-search](https://hashnode.com/tag/vector-search)
-   [#rag](https://hashnode.com/tag/rag)
-   [#distributed-sql](https://hashnode.com/tag/distributed-sql)

## Written by

[Sai Kiran Kshatriya](https://hashnode.com/@saikirankshatriya)

@saikirankshatriya

  
[View profile](https://hashnode.com/@saikirankshatriya)

## Responses 1

Markdown supported · ⌘↵ to post

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[3d ago](https://hashnode.com/posts/bringing-ai-context-closer-to-users-with-cockroachdb-table-localities/6aece9a441baeaa54dcb90a4/comment/6aed93e8b623060bb5e923ce)

The explicit tenant-and-region predicate makes normal reads easy to reason about. I would give a tenant re-home its own consistency test, because updating many context rows and changing the application’s expected\_home\_region need not become visible at exactly the same instant.

During a staged move, a request constrained only to the new region could see a partial corpus and still return a plausible answer. A migration fixture should issue retrievals throughout the transition and assert the intended completeness policy. Keeping the authoritative tenant placement and migration status explicit would make this a deliberate operational state rather than an accidental empty-result problem.
