Help planner to use hive_account_operations_type_account_id_op_seq_idx
Note this is probably equivalent to reverting !83 (645ce706)
When accepted_types is materialized, the planner doesn't recognize the join on the op_type_id as helpful, so it uses
Index Scan Backward using hive_account_operations_uq_1
which seems like a sensible index to use, but which can be slow for accounts that have done a huge number of operations such as block producers (i.e. gandalf and blocktrades as mentioned in !83 (merged)) if you then filter for very specific operations with a LIMIT requirement.
This isn't necessarily meant to be a perfect fix for this issue, just a quick fix for now. One serious concern is it may slow down queries for accounts that don't do a lot of operations. This change needs benchmarking soon.
Edited by Dan Notestein