Skip to content

possible fix for very slow update update_posts_rshares function

Marcin requested to merge mi_update_rshares_after_initial_sync into develop

During investigations, it showed up that when the db which is synced almost to blockchain head, postgres generate plans which use 'index scans' for hive_votes table and 'merge join', which is not efficient because after the initial sync, every row in the hive_votes table must be checked during executions of 'update_posts_rshares' procedure. It was tested that much better performance is reached when seq scans are allowed and postgres generates hash joins.

Merge request reports

Loading