QUERY PLAN
HashAggregate (cost=116.88..119.38 rows=200 width=42)
Group Key: r.status
-> HashAggregate (cost=100.49..106.45 rows=596 width=12)
Group Key: r.id
-> Hash Right Join (cost=76.75..99.00 rows=596 width=12)
Hash Cond: (rvr.erp_collect_ticket_id = r.id)
Filter: ((r.created_by = 1001) OR (rvr.user_id = 1001) OR (r.created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1017,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5388,5446,5449}'::integer[])))
-> Seq Scan on tbl_erp_collect_ticket_verify_rels rvr (cost=0.00..19.70 rows=970 width=8)
-> Hash (cost=51.89..51.89 rows=1989 width=16)
-> Seq Scan on tbl_erp_collect_tickets r (cost=0.00..51.89 rows=1989 width=16)