Improving database performance and space efficiency in deduplicated and snapshotable memory systems