QUERY PLAN
Sort (cost=73.92..73.96 rows=14 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..73.66 rows=14 width=26)
Filter: (contract_id = ANY ('{3822,3816,3811,3809,3792,3795,3787,3782,3778,3761}'::integer[]))