QUERY PLAN
Sort (cost=150.92..150.98 rows=27 width=227)
Sort Key: id DESC
-> Seq Scan on tbl_erp_collect_tickets (cost=0.00..150.27 rows=27 width=227)
Filter: ((status = 2) AND (sales_contract_id = ANY ('{2534,2739,2765,2777,2742,2776,2737,2647,2589,2672,2662,2658,2865,2599,2812,2878,2783,2756,2708,2817}'::integer[])))