From 02eab531d2adc93c235350fde50546c56b16118f Mon Sep 17 00:00:00 2001 From: Mark Zealey Date: Fri, 8 Jul 2022 10:20:14 +0100 Subject: [PATCH] Enable HOT updates on tables which meet criteria for them This reduces 3 IO's per update to 1 IO per update in a typical case. --- sql/pg.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sql/pg.sql b/sql/pg.sql index 52f9e5ec7..7e8151175 100644 --- a/sql/pg.sql +++ b/sql/pg.sql @@ -451,3 +451,17 @@ CREATE TABLE mqtt_pub ( user_properties bytea NOT NULL, expiry bigint NOT NULL ); + +-- Enable HOT updates on tables which meet criteria for them. This reduces 3 +-- IO's per update to 1 IO per update in a typical case. +ALTER TABLE archive_prefs SET (fillfactor = 90); +ALTER TABLE users SET (fillfactor = 90); +ALTER TABLE last SET (fillfactor = 90); +ALTER TABLE muc_room SET (fillfactor = 90); +ALTER TABLE muc_room_subscribers SET (fillfactor = 90); +ALTER TABLE pubsub_item SET (fillfactor = 90); +ALTER TABLE pubsub_node SET (fillfactor = 90); +ALTER TABLE pubsub_node_option SET (fillfactor = 90); +ALTER TABLE rosterusers SET (fillfactor = 90); +ALTER TABLE vcard SET (fillfactor = 90); +ALTER TABLE vcard_search SET (fillfactor = 90);