QUERY PLAN
Sort (cost=63.38..63.43 rows=21 width=29)
Sort Key: id
-> Bitmap Heap Scan on tbl_sales_contract_invoices (cost=37.76..62.91 rows=21 width=29)
Recheck Cond: (contract_id = ANY ('{4486,4480,4494,4479,4478,4476,4467,4495,4462,4457,4493,4453,4481,4446,4433,4399,4388,4373,4349,4291}'::integer[]))
-> Bitmap Index Scan on tbl_sales_contract_invoices_contract_id_idx (cost=0.00..37.75 rows=21 width=0)
Index Cond: (contract_id = ANY ('{4486,4480,4494,4479,4478,4476,4467,4495,4462,4457,4493,4453,4481,4446,4433,4399,4388,4373,4349,4291}'::integer[]))