QUERY PLAN
Sort (cost=73.87..73.90 rows=12 width=28)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..73.66 rows=12 width=28)
Filter: (contract_id = ANY ('{2,6,7,9,12,15,17,18,19,20}'::integer[]))