4.0.5: Добавлен covering index для reward_configs
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m28s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m28s
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
-- Rollback migration: Remove covering index for reward_configs
|
||||
|
||||
DROP INDEX IF EXISTS idx_reward_configs_task_id_covering;
|
||||
@@ -0,0 +1,14 @@
|
||||
-- Migration: Add covering index for reward_configs to optimize subtask rewards queries
|
||||
-- Date: 2026-01-26
|
||||
--
|
||||
-- This migration adds a covering index to optimize queries that load rewards for multiple subtasks.
|
||||
-- The index includes all columns needed for the query, allowing PostgreSQL to perform
|
||||
-- index-only scans without accessing the main table.
|
||||
--
|
||||
-- Covering index for reward_configs query
|
||||
-- Includes all columns needed for rewards selection to avoid table lookups
|
||||
CREATE INDEX IF NOT EXISTS idx_reward_configs_task_id_covering
|
||||
ON reward_configs(task_id, position)
|
||||
INCLUDE (id, project_id, value, use_progression);
|
||||
|
||||
COMMENT ON INDEX idx_reward_configs_task_id_covering IS 'Covering index for rewards query - includes all selected columns to avoid table lookups. Enables index-only scans for better performance when loading rewards for multiple tasks.';
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "play-life-web",
|
||||
"version": "4.0.4",
|
||||
"version": "4.0.5",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Reference in New Issue
Block a user