hive.copy_(transactions|operations) _to_irreversible is slow

Both methods are used to copy reversible blocks data to irreversible tables. Possible that left join makes the problem. There are two tests strongly connected with the left join:

tests/integration/functional/hive_fork_manager/hived_api/set_irreversible_not_copy_reversible_data_from_old_fork_test.sql
tests/integration/functional/hive_fork_manager/hived_api/set_irreversible_not_copy_reversible_data_from_top_fork_test.sql

Other functions hive.copy_(*)_to_irreversible look similar, and also need to be corrected

Problem started with fixing issue: psql_tools#22 (closed)

Edited by Marcin