七月迭代短暂完结,还有很多后端的关键东西没有弄,这是一版赶时间做的东西
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
This commit is contained in:
16
migrations/000183_add_package_expiry_scan_indexes.up.sql
Normal file
16
migrations/000183_add_package_expiry_scan_indexes.up.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- 为每日临期节点扫描增加按到期时间预筛的主套餐索引。
|
||||
CREATE INDEX IF NOT EXISTS idx_package_usage_card_expiry_scan
|
||||
ON tb_package_usage (expires_at, iot_card_id)
|
||||
WHERE deleted_at IS NULL
|
||||
AND master_usage_id IS NULL
|
||||
AND refund_id IS NULL
|
||||
AND status IN (1, 2)
|
||||
AND expires_at IS NOT NULL;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_package_usage_device_expiry_scan
|
||||
ON tb_package_usage (expires_at, device_id)
|
||||
WHERE deleted_at IS NULL
|
||||
AND master_usage_id IS NULL
|
||||
AND refund_id IS NULL
|
||||
AND status IN (1, 2)
|
||||
AND expires_at IS NOT NULL;
|
||||
Reference in New Issue
Block a user