Closed
Description
When we apply changes for a block, we issue individual SQL queries for each entity. Instead, we should change these operations to do bulk updates, for example, to clamp all entities that need it in one query. Ideally, transacting operations for a block will only issue 2 queries per block and entity type, one to update the block range of updated/deleted entities, and one to insert new entity versions.