presseportale/dev/legacy_performance/live-indexes.sql
Kevin Adametz 5b8bdf4182
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
12-05-2026 Frontend dev
2026-05-12 18:32:33 +02:00

17 lines
729 B
SQL

-- Legacy performance hotfixes for businessportal24.com
-- Execute these statements on the live database once.
--
-- If an index with the same name already exists, skip the matching ALTER TABLE
-- statement. Older MySQL versions do not support ADD INDEX IF NOT EXISTS.
ALTER TABLE press_release
ADD INDEX pr_status_language_created_idx (status, language, created_at);
ALTER TABLE press_release
ADD INDEX pr_category_status_language_created_idx (category_id, status, language, created_at);
ALTER TABLE press_release
ADD INDEX pr_company_status_language_created_idx (company_id, status, language, created_at);
ALTER TABLE press_release_image
ADD INDEX pri_pressrelease_preview_idx (press_release_id, is_preview_image);