Query to get actual batch wise stock in a warehouse

To get actual batch wise stock in a warehouse, we have to issue a query like this (from my understanding):

select item_code, batch_no, sum(actual_qty)
from `tabStock Ledger Entry`
where is_cancelled = 0 and warehouse='Work in progress'
group by item_code, batch_no
having sum(actual_qty) > 0

Even though warehouse is indexed, I’m concerned this could become slow over the years, as it reads the whole history for the warehouse.

Is there any more efficient way to get this data ?
Is there any ‘snapshot’ of actual batch-wise stock similar to tabBin ?