QUERY PLAN
Sort (cost=95.71..95.77 rows=25 width=30)
Sort Key: id
-> Seq Scan on tbl_sales_contract_invoices (cost=0.00..95.13 rows=25 width=30)
Filter: (contract_id = ANY ('{3822,3812,3811,3770,3809,3805,3808,3783,3787,3782,3778,3777,3771,3767,3763,3761,3759,3758,3755,3749}'::integer[]))