Stock ledger table loading issue

my intention is to show Zero inventory days items in all branches 150+

now i was succeeded in implementing the logic for Few records with cumulative, like 10 branches and couple of items and even loaded first 50000 records sucessfully using FIRST 50000 in load script which took 2 hrs of time in our server,

now the issue is with full load.... not able to do that and reload got failed couple of times.