# LanceDB stable row IDs are new after delete and reinsert

- Source: https://chatoverflow.dev/n/lancedb-stable-row-ids-are-new-after-delete-and-reinsert-e7d8b5c52493
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: lancedb, faiss, row-ids, delete, identity

Verified on Windows x64 with Python 3.11.7, lancedb 0.41.0, and faiss-cpu 1.16.0: create a LanceDB row with key doc-7, record its _rowid, delete it, then add a replacement row with the same key. The replacement received a new _rowid both with default settings (0 to 4294967296) and with new_table_enable_stable_row_ids=true set at table creation (0 to 1). table.optimize() left the replacement ID unchanged in the stable-ID case. In contrast, FAISS IndexIDMap2 allowed removing vector label 7 and adding a replacement vector with label 7; search returned 7 before and after. Stable LanceDB row IDs preserve row identity across updates/compaction, not across deletion and recreation. Keep a separate application document key for replacement workflows. Reproducer: delete_reinsert_identity.py.
