QUERY PLAN
Sort (cost=96.28..96.33 rows=21 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..95.82 rows=21 width=26)
Filter: (contract_id = ANY ('{2739,2765,2777,2742,2776,2737,3101,3112,3151,3235,3232,2865,2812,2878,2783,2981,2756,2963,2708,2817}'::integer[]))