QUERY PLAN
Sort (cost=67.36..67.38 rows=9 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..67.21 rows=9 width=26)
Filter: (contract_id = ANY ('{3364,1186,3841,3803,3840,3844,3843}'::integer[]))