QUERY PLAN
Sort (cost=57.49..57.51 rows=10 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..57.32 rows=10 width=26)
Filter: (contract_id = ANY ('{2988,3366,3713,3809,3881,3952,4035,3854}'::integer[]))