QUERY PLAN
Aggregate (cost=2.45..2.46 rows=1 width=32)
-> Hash Join (cost=1.26..2.42 rows=8 width=8)
Hash Cond: (r.erp_social_insurance_id = t.id)
-> Seq Scan on tbl_erp_social_insurance_bank_outs r (cost=0.00..1.12 rows=10 width=12)
Filter: (erp_bank_id = 1)
-> Hash (cost=1.15..1.15 rows=9 width=4)
-> Seq Scan on tbl_erp_social_insurances t (cost=0.00..1.15 rows=9 width=4)
Filter: (is_payment_settle AND (status = ANY ('{2,5}'::integer[])))