mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 06:11:26 +00:00
Run analyze in db_perf (#4420)
This commit is contained in:
parent
9367cbdb00
commit
f631f43024
1 changed files with 4 additions and 0 deletions
|
@ -130,6 +130,10 @@ async fn try_main() -> LemmyResult<()> {
|
|||
// Make sure the println above shows the correct amount
|
||||
assert_eq!(num_inserted_posts, num_posts as usize);
|
||||
|
||||
// Manually trigger and wait for a statistics update to ensure consistent and high amount of accuracy in the statistics used for query planning
|
||||
println!("🧮 updating database statistics");
|
||||
conn.batch_execute("ANALYZE;").await?;
|
||||
|
||||
// Enable auto_explain
|
||||
conn
|
||||
.batch_execute(
|
||||
|
|
Loading…
Reference in a new issue