QUERY PLAN
Sort (cost=88.84..88.89 rows=21 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..88.38 rows=21 width=26)
Filter: (contract_id = ANY ('{2742,2776,2737,3101,2672,2662,3112,3250,3235,3232,3247,3249,2865,2812,2783,2981,2756,2963,2708,2817}'::integer[]))