QUERY PLAN
Sort (cost=40.47..40.49 rows=9 width=29)
Sort Key: id
-> Bitmap Heap Scan on tbl_sales_contract_invoices (cost=22.01..40.33 rows=9 width=29)
Recheck Cond: (contract_id = ANY ('{4504,4476,4467,4462,4457,4481,1186}'::integer[]))
-> Bitmap Index Scan on tbl_sales_contract_invoices_contract_id_idx (cost=0.00..22.01 rows=9 width=0)
Index Cond: (contract_id = ANY ('{4504,4476,4467,4462,4457,4481,1186}'::integer[]))