QUERY PLAN
Sort (cost=99.12..99.17 rows=21 width=26)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..98.66 rows=21 width=26)
Filter: (contract_id = ANY ('{3101,3112,3151,3250,3235,3232,3247,3249,3300,3327,3363,3392,3364,3348,3388,3415,3384,3470,2981,2963}'::integer[]))