temboard icon indicating copy to clipboard operation
temboard copied to clipboard

Deleting Instances Takes a Very Long Time - Recommendation

Open bsislow opened this issue 3 years ago • 1 comments

Deleting an instance was taking a very long time. I reviewed foreign keys and came up with these recommendations to speed up the dependent removals. I recommend these for a future release.

CREATE INDEX CONCURRENTLY ON statements.statements_history (agent_address, agent_port, queryid, dbid, userid);
CREATE INDEX CONCURRENTLY ON statements.statements_history_current (agent_address, agent_port, queryid, dbid, userid);
CREATE INDEX CONCURRENTLY ON statements.statements_history_current_db (agent_address, agent_port);
CREATE INDEX CONCURRENTLY ON statements.statements_history_db (agent_address, agent_port);

bsislow avatar Dec 24 '20 14:12 bsislow

Thanks @bsislow !

bersace avatar Aug 12 '21 13:08 bersace