International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 185 - Number 43 |
Year of Publication: 2023 |
Authors: Dušan Petković |
10.5120/ijca2023923237 |
Dušan Petković . Performance of JSON Updates using Different Storage Forms. International Journal of Computer Applications. 185, 43 ( Nov 2023), 8-15. DOI=10.5120/ijca2023923237
This paper discusses performance of modification operations on JSON documents, stored in different relational storage forms. The first form is a “raw” document form, meaning that an exact copy of the JSON data is stored into relational table. The second one is the native form of MYSQL, which belongs to a group of binary formats for storing JSON. We discuss first the update primitives, which build a foundation for modification operations on JSON data. The existing forms of SQL UPDATE of the database system are used to implement these operations using two pairs of tables, which significantly differ in relation to their volume. We compare the performance of JSON updates on documents stored using the TEXT data type when data are stored in “raw” document form and using the JSON data type, when data are stored in the native (binary) form. Our study divides the update primitives in two groups: one for the modification operations on objects (name-value pairs) and the other one for the modification operations on arrays. For both groups of operations, we measure the performance when the data are stored in the proprietary binary format and in “raw” document one. Our measures show that for all UPDATE operations, except for the initial loading process, the modification of JSON data stored in the binary form is significantly faster than the modification of the same data stored in the “raw” document form. Additionally, improvements in execution time of update statements are higher in the case of the large JSON documents. In other words, the bigger the JSON document, the more significant the performance gains.