Subject Index root page full - GTT
Author Milan Tomeš - Position
Hello,

I'm running Firebird 2.1 SS on Windows XP Prof. SP3.
Using Firebird to load huge data (around 80GB at this time) and now I
used global temporary table to generate some new data. I ran query (in
fact its a block) to fill that GTT (its name is TMP_COBEC) and then I
tried to update some records. But after update of few hundred records I
get error mentioned in %subject%.

GTT table TMP_COBEC's DDL (character set UTF8 is used):

CREATE GLOBAL TEMPORARY TABLE TMP_COBEC (
ID_NAMEDPLC BIGINT,
AREA_ID BIGINT NOT NULL,
POI_ID BIGINT NOT NULL,
LANG_CODE VARCHAR(3) NOT NULL,
DESCRIPTION VARCHAR(255) NOT NULL,
DESCRIPTION_TR VARCHAR(255) NOT NULL,
COKRES_AREA_ID BIGINT NOT NULL,
ID_CCOUNTRY VARCHAR(3) NOT NULL,
GEOMETRY_POINT BLOB SUB_TYPE 0 SEGMENT SIZE 80,
GEOMETRY_POLY_CITY BLOB SUB_TYPE 0 SEGMENT SIZE 80,
GEOMETRY_POLY_SETTLEMENT BLOB SUB_TYPE 0 SEGMENT SIZE 80,
PRIORITY BIGINT NOT NULL,
SRC VARCHAR(3) NOT NULL,
NAME_TYPE VARCHAR(1) NOT NULL,
CITY_AREA_ID BIGINT,
SETTLEMENT_AREA_ID BIGINT
) ON COMMIT DELETE ROWS;

CREATE INDEX IX_TMP_COBEC_NT_AREA ON TMP_COBEC (NAME_TYPE, AREA_ID);
CREATE INDEX IX_TMP_COBEC_NT_POI ON TMP_COBEC (NAME_TYPE, POI_ID);
CREATE INDEX IX_TMP_COBEC_SRC_POI ON TMP_COBEC (SRC, POI_ID);



I ran this block when I get that error:

EXECUTE BLOCK
AS
DECLARE VARIABLE V_ID_NAMEDPLC BIGINT;
DECLARE VARIABLE V_AREA_ID BIGINT;
DECLARE VARIABLE V_POI_ID BIGINT;
DECLARE VARIABLE V_LANG_CODE VARCHAR(3) CHARACTER SET UTF8;
DECLARE VARIABLE V_DESCRIPTION VARCHAR(255) CHARACTER SET UTF8;
DECLARE VARIABLE V_DESCRIPTION_TR VARCHAR(255) CHARACTER SET UTF8;
DECLARE VARIABLE V_COKRES_AREA_ID BIGINT;
DECLARE VARIABLE V_ID_CCOUNTRY VARCHAR(3) CHARACTER SET UTF8;
DECLARE VARIABLE V_GEOMETRY_POLY_CITY BLOB SUB_TYPE TEXT CHARACTER SET
ASCII;
DECLARE VARIABLE V_GEOMETRY_POLY_SETTLEMENT BLOB SUB_TYPE TEXT CHARACTER
SET ASCII;
DECLARE VARIABLE V_GEOMETRY_POINT BLOB SUB_TYPE TEXT CHARACTER SET ASCII;
DECLARE VARIABLE V_PRIORITY BIGINT;
DECLARE VARIABLE V_SRC VARCHAR(3) CHARACTER SET UTF8;
DECLARE VARIABLE V_NAME_TYPE CHAR(1) CHARACTER SET UTF8;
DECLARE VARIABLE V_CITY_AREA_ID BIGINT;
DECLARE VARIABLE V_SETTLEMENT_AREA_ID BIGINT;
DECLARE VARIABLE V_L_AREA_ID BIGINT;
DECLARE VARIABLE V_R_AREA_ID BIGINT;
DECLARE VARIABLE V_AREA_AREACODE_1 INTEGER;
DECLARE VARIABLE V_AREA_AREACODE_2 INTEGER;
DECLARE VARIABLE V_AREA_AREACODE_3 INTEGER;
DECLARE VARIABLE V_AREA_AREACODE_4 INTEGER;
DECLARE VARIABLE V_AREA_AREACODE_5 INTEGER;
DECLARE VARIABLE V_AREA_AREACODE_6 INTEGER;
DECLARE VARIABLE V_AREA_AREACODE_7 INTEGER;
DECLARE VARIABLE V_AREA_ADMIN_LVL SMALLINT;
DECLARE VARIABLE V_AREA_GEOMETRY BLOB SUB_TYPE TEXT CHARACTER SET ASCII;
DECLARE VARIABLE V_TMP_AREA_ID BIGINT;
BEGIN
FOR SELECT POI_ID, COKRES_AREA_ID, GEOMETRY_POLY_CITY,
GEOMETRY_POLY_SETTLEMENT, GEOMETRY_POINT,
PRIORITY, SRC, CITY_AREA_ID, SETTLEMENT_AREA_ID
FROM TMP_COBEC
WHERE
(SRC IN ('C', 'BUA'))
INTO V_POI_ID, V_COKRES_AREA_ID, V_GEOMETRY_POLY_CITY,
V_GEOMETRY_POLY_SETTLEMENT, V_GEOMETRY_POINT,
V_PRIORITY, V_SRC, V_CITY_AREA_ID, V_SETTLEMENT_AREA_ID
DO
BEGIN
UPDATE TMP_COBEC
SET
COKRES_AREA_ID = :V_COKRES_AREA_ID,
GEOMETRY_POLY_CITY = :V_GEOMETRY_POLY_CITY,
GEOMETRY_POLY_SETTLEMENT = :V_GEOMETRY_POLY_SETTLEMENT,
GEOMETRY_POINT = :V_GEOMETRY_POINT,
PRIORITY = :V_PRIORITY,
SRC = :V_SRC,
CITY_AREA_ID = :V_CITY_AREA_ID,
SETTLEMENT_AREA_ID = :V_SETTLEMENT_AREA_ID
WHERE
(POI_ID = :V_POI_ID) AND
(SRC = 'N/A');
END
END

I tried to UTG, but unsuccessfull. Can anybody give me an advice?

Thanks

Milan Tomes