core: improve indexes (#6095)

* core: improve indexes

* update plans

* queries

* postgres migration

* optimize query

* lint

* plans

* add indexes

* schema

* plans

* postgres schema

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
spaced4ndy
2025-07-24 22:36:08 +00:00
committed by GitHub
parent 7b7926a73e
commit d69511bcad
11 changed files with 153 additions and 58 deletions
@@ -12,6 +12,7 @@ import Simplex.Chat.Store.Postgres.Migrations.M20250526_short_links
import Simplex.Chat.Store.Postgres.Migrations.M20250702_contact_requests_remove_cascade_delete
import Simplex.Chat.Store.Postgres.Migrations.M20250704_groups_conn_link_prepared_connection
import Simplex.Chat.Store.Postgres.Migrations.M20250709_profile_short_descr
import Simplex.Chat.Store.Postgres.Migrations.M20250721_indexes
import Simplex.Messaging.Agent.Store.Shared (Migration (..))
schemaMigrations :: [(String, Text, Maybe Text)]
@@ -23,7 +24,8 @@ schemaMigrations =
("20250526_short_links", m20250526_short_links, Just down_m20250526_short_links),
("20250702_contact_requests_remove_cascade_delete", m20250702_contact_requests_remove_cascade_delete, Just down_m20250702_contact_requests_remove_cascade_delete),
("20250704_groups_conn_link_prepared_connection", m20250704_groups_conn_link_prepared_connection, Just down_m20250704_groups_conn_link_prepared_connection),
("20250709_profile_short_descr", m20250709_profile_short_descr, Just down_m20250709_profile_short_descr)
("20250709_profile_short_descr", m20250709_profile_short_descr, Just down_m20250709_profile_short_descr),
("20250721_indexes", m20250721_indexes, Just down_m20250721_indexes)
]
-- | The list of migrations in ascending order by date