M7-09b P1 | ChatSession 知识库会话列表索引 #95
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
知识库下所有相关会话的查询索引。
索引
CREATE INDEX idx_chat_session_kb ON ChatSession(parentKnowledgeBaseId, scopeType, lastMessageAt DESC);
CREATE INDEX idx_chat_session_user_kb ON ChatSession(userId, parentKnowledgeBaseId, lastMessageAt DESC);
完成情况
交付物
知识库会话列表索引 (
prisma/schema.prisma):覆盖的查询场景
涉及文件