QUERY PLAN
Sort (cost=73.87..73.90 rows=12 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..73.66 rows=12 width=26)
Filter: (contract_id = ANY ('{3830,3811,3805,3791,3797,3795,3808,3796,3777,3790}'::integer[]))