Consultor Eletrônico



Kbase P100804: Performance problem when using the EXPORT statement in OE10
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   05/06/2008
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.x
OpenEdge 10.1A
All Supported Operating Systems

SYMPTOM(s):

Performance problem when using the EXPORT statement

Export to a stream using a MEMPTR takes a very long time

CHANGE:

Upgraded from Progress 9.1x to OpenEdge 10.x

CAUSE:

Bug# OE00113487

FIX:

Upgrade to OpenEdge 10.1B or later release.

Workaround:

Copy first the content of the MEMPTR in a BLOB and export the blob. Use a code like this:
DEFINE TEMP-TABLE temp-item NO-UNDO
FIELD mBlob AS BLOB.
CREATE temp-item.
COPY-LOB FROM mMemptr TO mBlob.
SET-SIZE(mMemptr) = 0.
OUTPUT STREAM sStream TO VALUE(ofilename) NO-CONVERT.
EXPORT STREAM sStream mBlob.
OUTPUT STREAM sStream CLOSE.
/*When exporting records that contain a BLOB or CLOB field, Progress creates
a separate object data file using a unique filename with a .blb extension
and stores that filename in the BLOB or CLOB field of the exported record. */

/*Reading the .blb file name*/
DEFINE VARIABLE blobFilename AS CHARACTER NO-UNDO.
INPUT FROM VALUE(ofilename).
IMPORT blobFilename.
INPUT CLOSE.

/*replacing the dummy output file with the .blb*/
OS-DELETE VALUE(ofilename) .
OS-RENAME VALUE(cpath + blobFilename) VALUE(ofilename).