Out of memory with large count of records with BLOBs
Posted: 13.02.2020, 20:35
Hello,
I use ZEOSLib 7.2.6 stable in Delphi 2010 to create a report (FastReports Release 6) with about 1.000 ID-cards with a photography on the card. Database is Firebird 2.5. The report selects about 1.000 records each with a picture in a blob filed. The picture-size is about 250kbytes as .jpg-file, so the report / datasource will use 250MBytes for the pictures.
During report-creation there is an "out of memory" exception. I sent a small example-project to fast-report and they told me that the error occures in the datasource and not in the report-component. It crashes after loading abut 500 ID-cards.
The computer has 16GByte of memory and Delphi2010-applications (as 32bit-applications) should be able to handle 4GBytes.
Are there any special settings for ZConnection or ZQurey to handle queries with many records and contained large blobs?
I tried the following without any change in number of successfully loaded records:
- ZQuery-Options doCachedLobs
- ZQuery fetchRow with values of 10, 100, 500
The sql is like this (simlified here but there are only some more text-fields in the original query):
select lastname, picture from persons;
A Delphi TDatasource-component is linked to the TZQuery and the report uses this TDatasource to get the records from the database.
Do you need more informations to give me a hint for solving the problem?
Many thanks,
Siegbert
I use ZEOSLib 7.2.6 stable in Delphi 2010 to create a report (FastReports Release 6) with about 1.000 ID-cards with a photography on the card. Database is Firebird 2.5. The report selects about 1.000 records each with a picture in a blob filed. The picture-size is about 250kbytes as .jpg-file, so the report / datasource will use 250MBytes for the pictures.
During report-creation there is an "out of memory" exception. I sent a small example-project to fast-report and they told me that the error occures in the datasource and not in the report-component. It crashes after loading abut 500 ID-cards.
The computer has 16GByte of memory and Delphi2010-applications (as 32bit-applications) should be able to handle 4GBytes.
Are there any special settings for ZConnection or ZQurey to handle queries with many records and contained large blobs?
I tried the following without any change in number of successfully loaded records:
- ZQuery-Options doCachedLobs
- ZQuery fetchRow with values of 10, 100, 500
The sql is like this (simlified here but there are only some more text-fields in the original query):
select lastname, picture from persons;
A Delphi TDatasource-component is linked to the TZQuery and the report uses this TDatasource to get the records from the database.
Do you need more informations to give me a hint for solving the problem?
Many thanks,
Siegbert