QUERY PLAN
Sort (cost=95.59..95.64 rows=21 width=30)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..95.13 rows=21 width=30)
Filter: (contract_id = ANY ('{3843,3841,3840,3842,3845,3837,3831,3844,3830,3816,3803,3792,3791,3797,3795,3796,3789,3790,3768,3764}'::integer[]))