QUERY PLAN
Sort (cost=99.18..99.23 rows=23 width=29)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..98.66 rows=23 width=29)
Filter: (contract_id = ANY ('{4351,4349,4378,4338,4335,4334,4332,4328,4327,4325,4322,4321,4320,4319,4318,4316,4313,4312,4308,4305}'::integer[]))