QUERY PLAN
Sort (cost=93.73..93.77 rows=19 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..93.32 rows=19 width=26)
Filter: (contract_id = ANY ('{4248,1756,4324,4323,4144,3363,3388,3746,3997,3967,3900,1692,1697,1734,1091,1177,1702,4467}'::integer[]))