Log-raw field behavior in a cursor.

sveinn

Member²
I have a table that a user can store documents & pictures into. The documents are stored into a long-raw field (TBlobField). This is a detail table and it is possible to sore many documents that belong to the same master-record. For each master record, I have a data bound grid that displays all the detail records (all the documents). I am migrating from BDE to DOA and I have a major performance problem here. There seams to be a difference how the long-raw field is handled and it is taking up to 8 times longer to display the detail records in the grid with the DOA components than with the BDE components. I think the difference is that the long-raw field is stored into memory for all the records in the cursor in the DOA case, but only when the field is accessed in the BDE case. If I have many large documents attached to the same master-record, then it is taking like forever to fill the grid (on 2nd thought, I think the 8 times slower is beside the point because the document size has more to do with the performance than anything else). Is there maybe a property I
 
...to be more speciffic, I'm using:
Delphi 5.0
Oracle 8i

The BDE setup is:
TDBGrid -> TDataSource -> TQuery -> TDatabse

The DOA substitude is:
TDBGrid -> TDataSource -> TOracelDataset -> TOracleSession

I found this explanation it the User's Guied:

"Unlike other query-fields, long values are not buffered. Every time the Field function of a long value is called, the value is fetched from the database. On the other hand, as long as you do not call the field function, the value is not fetched."

...I do not use any field function (at least not intentonally). I don't even import the long raw field into the fields-editor. I only drag the TDataSource, TOracleDataset and the TDBGrid onto a form, hook them up together and the field gets buffered.

Sveinn.
 
The "QueryAllRecords" perperty value is "False", so that's not the problem. Besides, it's ok if the records are all buffered in this case as long as the Long Raw field is not.

Thanks anyway.
Sveinn.
 
The dataset will indeed buffer the long raw data of the records that are present in the result set, so if you fetch a lot of records, performance will suffer.

------------------
Marco Kalter
Allround Automations
 
Back
Top