ORNL / DataFed

A Federated Scientific Data Management System
https://ornl.github.io/DataFed/
Other
18 stars 14 forks source link

System - Denormalize annotation info in data/collection DB routines #418

Closed dvstans closed 4 years ago

dvstans commented 4 years ago

Currently, returning annotation info from DB routines requires a subquery. This is inefficient and hard to maintain. Instead, create a static notes field that will be updated whenever annotations are created, updated, or deleted. This avoids the need for subqueries.

dvstans commented 4 years ago

This will not be done due to the impact on potentially many other DB records during updates. All of these updates must occur in a single transaction which will increase the likelihood of write-write conflicts. Keeping explicit annotation queries in read operations will only slightly slow down read operations which will not cause conflicts.