Home Help Center

freeze question

fansonfanson Member Haiyang ZhouOrganization: wuhan universityProject: postgresql and ICE integration ✭✭
i have a map called "fileinfo" in freeze. now there's about 7,000,000 records in the map. The size of this file is about 2GB.
now, i wanna traverse through the map, so i have to use iterator (i use const_iterator to read through the map). there are a few questions below:

1. Ice Freeze do not supply any method for random access through the map. is it right? iterator in Freeze is implemented using cursor in Berkeley DB, i'm not sure if Berkeley DB supply any random access method through cursor.

2. if i could not use find()/findBy() to locate the entry in the map, i have no other way to start traverse the map from some specified location. is this right? i don't know if the output sequence is always the same everytime i use iterator to traverse through the map while there's no any write operation on the map. "++" operation is usable for iterator, but there's no any "+" operation for iterator. if the traverse progress is interrupted when readding about 1,000,000 records, next time i have to read from the beginning. but i find out "++" operation for iterator is time consuming.

3. since there are 7,000,000 entries in the map, i wanna know how to set some parameters in DB_CONFIG. i post my config file below.
set_lk_max_lockers 1000000
set_lk_max_locks 1000000
set_lk_max_objects 1000000
set_tx_max 1000000
when i set some parameters to a small value, DataBaseExceptions come out. when i set some parameter to a large value, like 10,000,000, too much memory is used, swap + main memory about 9GB.

4. as i've described above, how can i make the traverse progress more efficient.

thanks
Sign In or Register to comment.