QUERY PLAN
Sort (cost=95.65..95.71 rows=23 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..95.13 rows=23 width=26)
Filter: (contract_id = ANY ('{3626,3736,3764,3713,3740,3768,3822,3797,3805,3795,3792,3812,3789,3816,3831,3830,3803,3844,3843,3845}'::integer[]))