QUERY PLAN
Sort (cost=64.50..64.53 rows=11 width=29)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..64.31 rows=11 width=29)
Filter: (contract_id = ANY ('{4159,4073,3805,3796,3699,3497,2941,2766,2747,2516}'::integer[]))