QUERY PLAN
Sort (cost=88.84..88.89 rows=21 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..88.38 rows=21 width=26)
Filter: (contract_id = ANY ('{3300,3327,3392,3364,3348,3363,3388,3415,3384,3502,3525,3537,3549,3550,3493,3620,3598,3661,3703,3724}'::integer[]))