Improve GC performance for Herald Transcripts
Summary: This has to table scan a ginormous table right now, give it a fighting chance with a more usable key. Test Plan: - Launched GC daemon, no errors. - Used test console to create a new transcript. - Viewed some old transcripts. - Ran EXPLAIN on the SELECT and verified it was utilizing the garbageCollected key. Reviewed By: jungejason Reviewers: jungejason, tuomaspelkonen, aran CC: aran, epriestley, jungejason Differential Revision: 735
This commit is contained in:
9
resources/sql/patches/069.heraldxscript.sql
Normal file
9
resources/sql/patches/069.heraldxscript.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
ALTER TABLE phabricator_herald.herald_transcript
|
||||
ADD garbageCollected BOOL NOT NULL DEFAULT 0;
|
||||
|
||||
UPDATE phabricator_herald.herald_transcript
|
||||
SET garbageCollected = 1
|
||||
WHERE objectTranscript = "";
|
||||
|
||||
ALTER TABLE phabricator_herald.herald_transcript
|
||||
ADD KEY (garbageCollected, time);
|
||||
Reference in New Issue
Block a user