QUERY PLAN
Sort (cost=115.79..115.86 rows=25 width=223)
Sort Key: id DESC
-> Seq Scan on tbl_erp_collect_tickets (cost=0.00..115.21 rows=25 width=223)
Filter: ((status = 2) AND (sales_contract_id = ANY ('{2742,2776,2737,3101,2672,2662,3112,3250,3235,3232,3247,3249,2865,2812,2783,2981,2756,2963,2708,2817}'::integer[])))