2024-01-23 11:26:27 +00:00
|
|
|
--
|
|
|
|
-- This file is licensed under the Affero General Public License (AGPL) version 3.
|
|
|
|
--
|
|
|
|
-- Copyright (C) 2023 New Vector, Ltd
|
|
|
|
--
|
|
|
|
-- This program is free software: you can redistribute it and/or modify
|
|
|
|
-- it under the terms of the GNU Affero General Public License as
|
|
|
|
-- published by the Free Software Foundation, either version 3 of the
|
|
|
|
-- License, or (at your option) any later version.
|
|
|
|
--
|
|
|
|
-- See the GNU Affero General Public License for more details:
|
|
|
|
-- <https://www.gnu.org/licenses/agpl-3.0.html>.
|
|
|
|
|
|
|
|
-- Force the statistics for these tables to show that the number of distinct
|
|
|
|
-- chain IDs are proportional to the total rows, as postgres has trouble
|
|
|
|
-- figuring that out by itself.
|
|
|
|
ALTER TABLE event_auth_chain_links ALTER origin_chain_id SET (n_distinct = -0.5);
|
|
|
|
ALTER TABLE event_auth_chain_links ALTER target_chain_id SET (n_distinct = -0.5);
|
2024-01-24 13:57:12 +00:00
|
|
|
|
|
|
|
-- We should have done an `ANALYZE event_auth_chain_links` here, but we forgot.
|