Browse Prior Art Database

Effective space management with high performance on writing DB

IP.com Disclosure Number: IPCOM000014769D
Original Publication Date: 2002-Jan-03
Included in the Prior Art Database: 2003-Jun-20
Document File: 4 page(s) / 31K

Publishing Venue

IBM

Abstract

"Saving DB records, Reducing DB I/O"

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 56% of the total text.

Page 1 of 4

Effective space management with high performance on writing DB

"Saving DB records, Reducing DB I/O"

[Environment]

          Program A Program B
+---------+ +---------+
"Input"------> | DB | |

| | Write +-------+ Read | |
| ------------> |Transa-| ----------> |
| ----+ |ctions | +------> ------------>"Output"
| | | | | | | ----+
+---------+ | +-------+ | +---------+ |

| +-----------+ | | +-------------+
+-----> |Written Key|--+ +-> |Processed Key|

           +-----------+ +-------------+
(Readable DB record key by Program B)

Conditions:

1. "Input" is converted to transactions by Program A.
2. "Output" is created by processing a transaction by Program B.
3. DB is constructed by fixed record length.
4. Transactions are variable length depending on "Input"

Points:

1. How Program A writes DB records which are fully stacked with transactions ?

2. Number of DB I/O of Program B is reduced if transactions are fully stacked in
each DB record.

Which one is effective ?

record1 |aaaaaaaa, | -> 1 transaction in a DB
record
record2 |bbbbb, | -> 1 transaction in a DB
record
record3 |cccccccccccccccccccc, | -> 1 transaction in a DB
record

-> 3 DB I/O's are required to process 3 transactions.

record1 |aaaaaaaa,bbbbb,cccccccccccccccccccc,| -> 3 transactions in a DB
record

-> 1 DB I/O is required to process 3 transactions.

[Old Mechanism]

Program A
loop
get a "Input"
convert Input into transactions
get new DB record
increment Written Key
set transactions into the record
write the record into DB
write Written Key
end-loop

-> 3 pair of DB I/O's are required.

1

Page 2 of 4

|

V

DB (process 3 Inputs by Program A)

            Written Key Written DB record
1st Input -> record1 record1|aaaaaaaa, |
2nd Input -> record2 record2|bbbbb, |
3rd Input -> record3 record3|cccccccccccccccccccc, |

+------------------------------------+

record1|aaaaaaaa, |
record2|bbbbb, |
record3|cccccccccccccccccccc, |

:

+------------------------------------+

+---------+

Written Key | record3 |

+---------+

+---------+

Processed Key | record0 |

+---------+

-> 3 DB records are required.

|

V

Program B
loop
get Written Key
get Processed Key
do while [Written Key]>[Processed Key]
read a DB record
process each transaction of the record and send a "Output"
increment Processed Key
write Processed Key
end-do
end-loop

|

V

+---------+

Processed Key | record3 |

+---------+

-> 3 DB I/O's are...