Skip to content

Commit

Permalink
vaccum account_ids+blockhash_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
grooviegermanikus committed Jul 3, 2024
1 parent 656e6c4 commit ee075df
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,23 @@ impl PostgresBlockStore {
);
let statement2 = format!(
r#"
VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.transaction_blockdata
VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.account_ids
"#,
schema = PostgresEpoch::build_schema_name(epoch),
);
let statement3 = format!(
r#"
VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.blockhash_ids
"#,
schema = PostgresEpoch::build_schema_name(epoch),
);
let statement4 = format!(
r#"
VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.transaction_blockdata
"#,
schema = PostgresEpoch::build_schema_name(epoch),
);
let statement5 = format!(
r#"
VACUUM (SKIP_LOCKED true, PROCESS_TOAST false, TRUNCATE false, INDEX_CLEANUP off) {schema}.blocks
"#,
Expand All @@ -383,6 +395,8 @@ impl PostgresBlockStore {
write_session.execute_multiple(&statement1),
write_session.execute_multiple(&statement2),
write_session.execute_multiple(&statement3),
write_session.execute_multiple(&statement4),
write_session.execute_multiple(&statement5),
);

let elapsed = started.elapsed();
Expand Down

0 comments on commit ee075df

Please sign in to comment.