实现店铺联系电话精确查询与索引

This commit is contained in:
2026-07-22 15:06:06 +09:00
parent 751cb46079
commit 2fd11daaf0
14 changed files with 904 additions and 64 deletions

View File

@@ -0,0 +1,2 @@
-- 回滚联系电话查询索引,不修改店铺业务数据。
DROP INDEX IF EXISTS idx_shop_contact_phone;

View File

@@ -0,0 +1,4 @@
-- 为未软删除店铺的联系电话精确查询增加非唯一部分索引。
CREATE INDEX idx_shop_contact_phone
ON tb_shop USING btree (contact_phone)
WHERE deleted_at IS NULL;