During full sync (or maybe also upgrade) reconnect after VACUUM ANALYZE
It seems like it's needed to establish new connection to profit from VACUUM ANALYZE hive_posts
During initial sync, there are multiple occurrences of operations on a big hive_posts
table
and multiple instances of VACUUM ANALYZE
, it might be that we are not getting profits from running it because we continue without re-connecting, so the following queries are running for a long time (see #123 (closed))
207116 INFO - hive.db.db_state - [INIT] Query VACUUM ANALYZE hive_posts done in 423.3412s
208192 INFO - hive.db.db_state - [INIT] Query select update_hive_posts_root_id(0, 49956365) done in 1075.7588s
208712 INFO - hive.db.db_state - [INIT] Query VACUUM ANALYZE hive_posts done in 519.6164s
210296 INFO - hive.db.db_state - [INIT] Query select update_hive_posts_api_helper(0, 49956365) done in 1583.8307s
220646 INFO - hive.db.db_state - [INIT] update_all_posts_active executed in 10350.5263s
220947 INFO - hive.db.db_state - [INIT] Query VACUUM ANALYZE hive_posts done in 301.2349s
221407 INFO - hive.db.db_state - [INIT] Query SELECT update_feed_cache(0, 49956365); done in 459.1969s
221428 INFO - hive.db.db_state - [INIT] Query SELECT update_hive_posts_mentions(0, 49956365); done in 21.3289s
226576 INFO - hive.db.db_state - [INIT] Query SELECT update_account_reputations(0, 49956365, True); done in 5147.3995s
267020 INFO - hive.db.db_state - [INIT] Query SELECT update_posts_rshares(0, 49956365); done in 40442.9312s
267770 INFO - hive.db.db_state - [INIT] Query VACUUM ANALYZE hive_posts done in 749.6241s