QUERY PLAN
Sort (cost=38.65..38.67 rows=8 width=26)
Sort Key: id
-> Bitmap Heap Scan on tbl_sales_contract_invoices (cost=21.73..38.53 rows=8 width=26)
Recheck Cond: (contract_id = ANY ('{1186,4492,4491,4443,4486,4504}'::integer[]))
-> Bitmap Index Scan on tbl_sales_contract_invoices_contract_id_idx (cost=0.00..21.73 rows=8 width=0)
Index Cond: (contract_id = ANY ('{1186,4492,4491,4443,4486,4504}'::integer[]))