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 ('{3364,3732,3830,3844,3843,3845}'::integer[]))