QUERY PLAN
Sort (cost=123.07..123.10 rows=12 width=227)
Sort Key: id DESC
-> Seq Scan on tbl_erp_collect_tickets (cost=0.00..122.85 rows=12 width=227)
Filter: ((status = 2) AND (sales_contract_id = ANY ('{21,59,7,2,12,9,15,6,52,19}'::integer[])))