QUERY PLAN
Sort (cost=65.14..65.16 rows=6 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..65.06 rows=6 width=26)
Filter: (contract_id = ANY ('{3822,3812,3816,3831,3830,3844}'::integer[]))