Conventional databases i.e. row store are good for write operations therefore database with row store architecture is also called as write optimized system.This type of architecture is effective especially in OLTP systems.
Row storage is the conventional technique that is used in earlier databases to store the data in the tabular form. In row storage, data is inserted in form of tuple. Each tuple is nothing but a row which is unique identification of each record. There are many advantages of row store but the main or important advantage is easy to add or modify a record. So the systems where write back to database operation is required in that case row store is easier than column store.
A column oriented database (also called as C-stores) stores the content column wise rather than by row. Though this technique is totally opposite to the conventional database, it is very useful in data compression, Storing data by column results in better compression than the conventional row store. It also performs well while query processing since queries read only the columns which are required.
SQL For Monitoring Row Store Table:
Total Memory Consumption of All Row Tables:
SELECT round(sum(USED_FIXED_PART_SIZE + USED_VARIABLE_PART_SIZE)/1024/1024) AS "Row Tables MB" FROM M_RS_TABLES;
Memory Consumption of Row-Ordered Tables in Schema :
SELECT SCHEMA_NAME, TABLE_NAME,
round((USED_FIXED_PART_SIZE + USED_VARIABLE_PART_SIZE)/1024/1024, 2) AS "MB Used" FROM M_RS_TABLES WHERE schema_name = 'SYSTEM' ORDER BY "MB Used" DESC, TABLE_NAME
Advantages:
* easier to insert and update
* the data is stored together
* Row Store tables have a primary index
* Row ID maps to primary key
* Secondary indexes can be created
* Recommended when the tables contain less volume of data.
* Used when the application request has to access the entire row.
* The application needs to only process a single record at one time (many selects and/or updates of single records).
* The application typically needs to access a complete record (or row).
* The columns contain mainly distinct values so that the compression rate would be low.
* Neither aggregations nor fast searching are required.
* The table has a small number of rows (e. g. configuration tables).
The disadvantages are :
* all data in a row has to be read even though the requirement may be to access data from a few columns (in analytical processing)
Topic on - Column Store Table in SAP HANA
Topic on - Convert Row Store to Column Store Table in HANA
Topic on - Column Store Table in SAP HANA
Topic on - Convert Row Store to Column Store Table in HANA
No comments:
Post a Comment