When you manipulate rows in tables, the system logs shown below are output.
For HiRDB/Single Server, add the amount of system log information calculated here to the amount of log information output by Single Server. For HiRDB/Parallel Server, add the amount of system log information calculated here to, respectively, the amounts of log information output by the back-end server and dictionary server that manage the RDAREAs that store the tables and indexes being updated.
Table 17-1 Types of system log information that are output when table rows are manipulated
Type of system log information | Description |
---|---|
Base row log information | This log information is output when a table's row data is added, deleted, or updated. |
Branch row log information | This log information is output when row data is manipulated in columns with the following data types:
|
Index log information | This log information is output when index keys are added, deleted, or updated. Determine the amount of index log information on the basis of the type of database manipulation (INSERT, DELETE, or UPDATE statement), as shown in Table 17-2. |
Event log | This log information is output when HiRDB Datareplicator is used or when row data containing repetition columns is added, deleted, or updated. |
Table 17-2 Amount of log information depending on type of database manipulation
Type of data manipulation (SQL statement) | Amount of log information |
---|---|
Key addition (INSERT statement) | Amount of addition log information |
Key deletion (DELETE statement) | Amount of deletion log information |
Key updating (UPDATE statement) | Amount of deletion log information for the key before updating + amount of addition log information for the key after updating |
The amount of system log information that is output when a database is updated (INSERT, DELETE, or UPDATE) can be obtained from Formulas 1 and 2 as follows, depending on the type of operation (INSERT, DELETE, or UPDATE).
The amount of system log information that is output during UAP execution that does collect log is 460 bytes, which is based on the fact that segment allocations occur.
Condition | Formula (bytes) |
---|---|
Amount of system log information that is output to add (INSERT) or delete (DELETE) n rows in a table | (a + b + c) x n |
Amount of system log information that is output to update (UPDATE) n rows in a table | (a#1 + d#2 + e#3) x n |
The following table lists the formulas for determining the amount of base row log information per data item.
Table 17-3 Formulas for determining the amount of base row log information per data item
Type of data manipulation (SQL statement) | Amount of log information output (bytes) | |
---|---|---|
Data addition (INSERT statement) | k + 152 | |
Data deletion (DELETE statement) | ||
Data updating (UPDATE statement) | FIX table with f![]() | f![]() i=1 f ![]() j=1 |
Non-FIX table or f > 12 | k1 + k2 + 160![]() 314 x 2 | |
Row interface used | 2 x k1 + 160 |
Table 17-4 Formulas for determining the amount of log information per BLOB column data item
Type of data manipulation (SQL statement) | Specification of recovery | Amount of log information output (bytes) |
---|---|---|
Data addition (INSERT statement) | Not specified or partial specified | 604 + 180 x p5 |
All specified | 2,348 + p1 + 8,340 x p2 + (148 + lt) x p3 | |
Not specified | 300 | |
Data deletion (DELETE statement) | Not specified or partial specified | 460 + 180 x p6 |
All specified | ||
Not specified | 468 | |
Data updating (UPDATE statement) | Not specified or partial specified | 604 + 180 x p5 + 460 + 180 x p6 |
All specified | 2,496 + p1 + 8,334 x p2 + (148 + lt) x p3 | |
Not specified | 312 | |
Data concatenation operation (UPDATE statement) Bb ![]() | Not specified or partial specified | 2,344 |
All specified | 8,340 x a + 1,600 + d + 8,340 x p4 + (148 + lt2) x p3 | |
Not specified | 428 | |
Data concatenation operation (UPDATE statement) Bb > 7,168 | Not specified or partial specified | 2,772 |
All specified | 2,772 + Ba + 8,340 x p4 + (148 + lt2) x p3 | |
Not specified | 428 | |
Backward deletion/updating of data (UPDATE statement) Bb ![]() | Not specified or partial specified | 2,344 |
All | 9,512 | |
No | 428 | |
Backward deletion/updating of data (UPDATE statement) Bb > 7,168 | Not specified or partial specified | 2,492 + 180 x![]() ![]() ![]() |
All | 2,492 + 180 x![]() ![]() ![]() | |
No | 428 + 180 x![]() ![]() ![]() |
Calculate the amount of branch row log information that will be generated. The following table lists the formulas for determining the amount of log information per branch row.
Table 17-5 Formulas for determining the amount of log information per branch row (1)
Type of data manipulation (SQL statement) | Amount of log information output (bytes) | |
---|---|---|
Data addition (INSERT statement) | k + 152 | |
Data deletion (DELETE statement) | ||
Data updating (UPDATE statement) | Creating a new branch row by update processing | k2 + 160 |
Updating a branch row | k1 + k2 + 160 | |
Deleting a branch row by update processing | k1 + 160 |
Calculate the amount of branch row log information that will be generated. The table below lists the formulas for determining the amount of log information per branch row.
If there is more than one table storage RDAREA and the page length varies from one RDAREA to another, obtain the amount of branch row log information for each RDAREA with the same page length, then use their sum as the amount of branch row log information.
Table 17-6 Formulas for determining the amount of log information per branch row (2)
Type of data manipulation (SQL statement) | Amount of log information output (bytes) |
---|---|
Data addition (INSERT statement) | SPN x (b + 152) |
Data deletion (DELETE statement) | |
Data updating (UPDATE statement) | SPN x (b + 160) |
Data concatenation operation (UPDATE statement)#1 | (b + 160) + (SPN - 1) x (b + 152)![]() 160 |
Backward deletion/updating of data (UPDATE statement)#1, #2 | (b x 2 + 160) + (![]() ![]() ![]() ![]() 160 |
SPN = SPN1 + SPN2 |
Use the formulas shown in the following table to determine the amount of index log information that is output for each row operated on in an index.
Table 17-7 Amount of index log information per index
Type of data manipulation (SQL statement) | Amount of log information output (bytes) | ||
---|---|---|---|
Key addition (INSERT statement) | Adding a new key | k1 + 156 or (k1 + 156) x 2# | |
Adding the same key as for existing row | d![]() | k1 + 156 | |
d > 200 | k1 + 292 | ||
Key deletion (DELETE statement) | Deleting a key value | k2 + 156 | |
Deleting the same key value as for existing row | d![]() | k2 + 156 | |
d > 200 | k2 + 292 | ||
Key updating (UPDATE statement) | Amount of log information for key deletion + amount of log information for key addition |
The following figure illustrates the concept of index page splitting.
Figure 17-1 Concept of index page splitting
When a page that stores an index is split, HiRDB uses one of the two methods explained below to store the key value.
The following table lists the amount of index log information output per instance by split type.
Table 17-8 Amount of index log information by split type
Split type | Condition | Amount of log information output (bytes) | ||
---|---|---|---|---|
Page splitting containing the maximum key value | Adding a key value that is different from any key value already in the index | There is enough unused area to add the key in upper-level page | 2 x k1 + a + 8 x (m + 1) ![]() | 2 x k1 + 472 + a + 8 x (m + 1) |
2 x k1 + a + 8 x (m + 1) > 31,516 | 2 x k1 + 632 + a + 8 x (m + 1) | |||
There is not enough unused area to add the key in upper-level page | 2 x k1 + a + 8 x (m + 1) ![]() | n-1![]() i=2 + 2 x k1 + 472 + a + 8 x (m + 1) | ||
2 x k1 + a + 8 x (m + 1) > 31,516 | n-1![]() i=2 + 2 x k1 + 628 + a + 8 x (m + 1) | |||
Adding the same key value as one already in the index | d1![]() | There is enough unused area to add the key in upper-level page | 2 x k1 + 472 + a + 8 x (m + 1) | |
There is not enough unused area to add the key in upper-level page | n-1![]() i=2 + 2 x k1 + 472 + a + 8 x (m + 1) | |||
d1 > 200 | There is enough unused area to add the key in lower-level page | k1 + 472 + a | ||
There is not enough unused area to add the key in lower-level page | k1 + 462 + 2 x a | |||
Page splitting without the maximum key value | There is not enough unused area to add the key | There is enough unused area to add the key in upper-level page | 2 x k1 + a + 8 x (m + 1) ![]() | 2 x k1 + 332 + a + 8 x (m + 1) |
2 x k1 + a + 8 x (m + 1) > 31,516 | 2 x k1 + 492 + a + 8 x (m + 1) | |||
There is not enough unused area to add the key in upper-level page | 2 x k1 + a + 8 x (m + 1) ![]() | n-1![]() i=2 + 2 x k1 + 332 + a + 8 x (m + 1) | ||
2 x k1 + a + 8 x (m + 1) > 31,516 | n-1![]() i=2 + 2 x k1 + 492 + a + 8 x (m + 1) |
Table 17-9 Amount of log information for page allocation and segment allocation
Condition | Amount of log information output (bytes) |
---|---|
Allocation of a new page for storing rows resulting from data addition (INSERT) or updating (UPDATE) | 440 |
Index page splitting resulting from data addition (INSERT) or updating (UPDATE) | 544 x n + 272 |
Segment allocation resulting from the above page allocation (each time as many pages are allocated as the segment size) | 1,940 |
The event log information is output when row data containing repetition columns is added, deleted, or updated using HiRDB Datareplicator. The following table shows the amount of event log information that is output when a single row is manipulated.
Table 17-10 Amount of event log information that is output when a single row is manipulated
Type of data manipulation | Amount of event log information (bytes) | |
---|---|---|
Data addition (INSERT statement) | 156 x n | |
Data updating (UPDATE statement) | New elements added by updating (UPDATE ADD) | 164 x n |
Elements deleted by updating (UPDATE DELETE) | n![]() i = 1 | |
Only specified elements updated (UPDATE SET) | n![]() i = 1 | |
Specified repetition columns updated (UPDATE SET) | 164 x n |