QUERY PLAN
Sort (cost=96.48..96.53 rows=22 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..95.99 rows=22 width=26)
Filter: (contract_id = ANY ('{4349,4313,4378,4325,4316,4318,4321,4320,4332,4319,4351,4322,4357,4328,4334,4335,4312,4327,4338}'::integer[]))