QUERY PLAN
Sort (cost=69.48..69.50 rows=8 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..69.36 rows=8 width=26)
Filter: (contract_id = ANY ('{3437,3316,3015,2788,2690,2487,2498,2260}'::integer[]))