QUERY PLAN
Sort (cost=73.97..74.01 rows=16 width=28)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..73.65 rows=16 width=28)
Filter: (contract_id = ANY ('{3853,3642,3449,3356,3297,3240,3214,3116,3099,3074,3073,2979,2845,2972,2835}'::integer[]))