![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
One particular database has around 200,000 records and regularly creates a cursor, positions at starting points and reads records until the records go out of scope. In one particular instance the application reads a set of records that amount to over 50,000 records. Usually all is OK, but every few days the read starts returning only exactly 40,000 records for the same set. This continues to occur until the application is restarted and the environment renewed. When the application is restarted the correct number of records is returned. |
#3
| |||
| |||
|
|
One particular database has around 200,000 records and regularly creates a cursor, positions at starting points and reads records until the records go out of scope. In one particular instance the application reads a set of records that amount to over 50,000 records. Usually all is OK, but every few days the read starts returning only exactly 40,000 records for the same set. This continues to occur until the application is restarted and the environment renewed. When the application is restarted the correct number of records is returned. |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
So in the end it was not the database environment as such. It was the database environment sucking up the RAM and leaving insufficient contiguous memory for the rest of the application. |
|
A work around for the problem was to reduce the cache size. I will also fix the code to read through the record set twice, once to count the records and a second time to populate the array with a single malloc. It would be nice if you could count the keys between a key range without having to read every record! |
![]() |
| Thread Tools | |
| Display Modes | |
| |