Wouldn't it be better to overwrite `_get_date_ranges_percentage` and return percent of total price in some dates interval? Then ServiceBasePlugin will take care of the rest. For now you're making huge amount of SQL queries - for each daily usage you're querying for price in that day. Maybe you could write single sql query to get everything at once? Sth like that:
```
SELECT venture_id, SUM(value), SUM(UP.price * DU.value) FROM DailyUsage DU JOIN UsagePrice UP ON DU.type == UP.type AND DU.date >= UP.start AND DU.date <= UP.end WHERE DU.date >= 'start' AND DU.date <= 'end' AND DU.type IN ('types') GROUP BY  venture_id
```