Fastest way to write/read BLOBs
Posted: Mon 13 Nov 2006 13:51
Hi,
I need to read and write BLOBs (ca 50 - 100MB each) as fast as possible.
I don't want to allocate the whole BLOB into memory at any time, but rather use some streaming funtionality.
The Oracle LOB manual states: "The most efficient way to write large amounts of LOB data is to use OCILobWrite2() with the streaming mechanism enabled, and using polling or a callback "
What is the best way to implement this using ODAC?
Method1:
MyOraLob = MyOraTable->GetLob("MYBLOBFIELD");
MyOraLob->Write(...); //loop this statement until whole blob is written
Method2:
MyOraTableMYBLOBFIELD->LoadFromStream(...);
Method3:
MyOraStoredProc->ParamByName('blob')->AsBLOBLocator->LoadFromStream(...);
MyOraStoredProc->Execute();
Or maybe some other way that I've not yet discovered???
Are there different pro's con's of the various methods?
/Leif
I need to read and write BLOBs (ca 50 - 100MB each) as fast as possible.
I don't want to allocate the whole BLOB into memory at any time, but rather use some streaming funtionality.
The Oracle LOB manual states: "The most efficient way to write large amounts of LOB data is to use OCILobWrite2() with the streaming mechanism enabled, and using polling or a callback "
What is the best way to implement this using ODAC?
Method1:
MyOraLob = MyOraTable->GetLob("MYBLOBFIELD");
MyOraLob->Write(...); //loop this statement until whole blob is written
Method2:
MyOraTableMYBLOBFIELD->LoadFromStream(...);
Method3:
MyOraStoredProc->ParamByName('blob')->AsBLOBLocator->LoadFromStream(...);
MyOraStoredProc->Execute();
Or maybe some other way that I've not yet discovered???
Are there different pro's con's of the various methods?
/Leif