Hi,
why concating blob consume memory and not leave it until transaction end?
simple sample
SET TERM ^ ;
CREATE PROCEDURE TEST_BLOB_CONCAT
( A BLOB SUB_TYPE TEXT, ILE INTEGER )
RETURNS
( B BLOB SUB_TYPE TEXT )
AS
DECLARE VARIABLE VAR_I INTEGER;
BEGIN
VAR_I = 0;
B = 'ABC';
WHILE (VAR_I<ILE) DO
BEGIN
B = B || A;
VAR_I = VAR_I + 1;
END
SUSPEND;
END^
SET TERM ; ^
/*----------------------------------------------------*/
SELECT * FROM TEST_BLOB_CONCAT('', 5000)
result 'ABC'
consume memory
________used: 12208
_________max: 38112
_____allocated: 65536
_allocatedmax: 65536
/*----------------------------------------------------*/
SELECT * FROM TEST_BLOB_CONCAT('', 500000)
result 'ABC'
consume memory
________used: 12208
_________max: 2338208
_____allocated: 2359296
_allocatedmax: 2359296
/*----------------------------------------------------*/
SELECT * FROM TEST_BLOB_CONCAT('', 50000000)
result 'ABC'
consume memory all memory from operating system!
It looks like some temp buffers are created and not freed until transaction end
Is this bug reported or i should report it to the tracker?
regards,
Karol Bieniaszewski
[firebird-support] Blob concat consume memory - why?
liviuslivius [email protected] [firebird-support] Wed, 24 Jun 2015 00:28:29 -0700
- ... liviuslivius [email protected] [firebird-support]
- ... Helen Borrie [email protected] [firebird-support]
- ... liviuslivius [email protected] [firebird-support]
- ... Helen Borrie [email protected] [firebird-support]
- ... liviuslivius [email protected] [firebird-support]
- ... liviuslivius [email protected] [firebird-support]
- ... 'Softtech Support' [email protected] [firebird-support]
- ... Svein Erling Tysvær [email protected] [firebird-support]
- ... 'Softtech Support' [email protected] [firebird-support]
- ... 'Bogdan' [email protected] [firebird-support]
- ... 'Softtech Support' [email protected] [firebird-support]
