Subject | Re: FireBird 2.5 How can i create 1 byte (0-255) column? |
---|---|
Author | wan30032 |
Post date | 2013-04-06T06:43:47Z |
thanks everyone.
Now i do like this:
Create Table T1 (IID BIGINT,
I1 CHAR(1) CHARACTER SET OCTETS,
I2 CHAR(1) CHARACTER SET OCTETS
.... //200 Columns
);
and Creat Database with CHARACTER ASCII,PageSize 4096
1.How can i select column value?
IID I1 I2 I3
1 ff 05 34
select * from t1 where I1='ff' ?
2.Import Data
i Create Files as HEX:
like FileName 'c:\1.data'
01 00 00 00 00 00 00 00 FF 05 34 ... //200
02 00 00 00 00 00 00 00 1C 02 00 ... //200
CREATE TABLE EXT1 EXTERNAL FILE 'c:\1.data'
(IID BIGINT,
I1 CHAR(1) CHARACTER SET OCTETS,
I2 CHAR(1) CHARACTER SET OCTETS
.... //200 Columns
);
insert into t1 select * from ext1;
Now in my PC£¨windows 7 64+Firebird 2.5£©
about 90 seconds can insert 2,000,000 records.
so, how can become faster£¿
firebird.conf setting is:
ExternalFileAccess = FULL
DefaultDbCachePages=4096
MaxUnflushedWrites=100
MaxUnflushedWriteTime=5
DatabaseGrowthIncrement = 134217728
Now i do like this:
Create Table T1 (IID BIGINT,
I1 CHAR(1) CHARACTER SET OCTETS,
I2 CHAR(1) CHARACTER SET OCTETS
.... //200 Columns
);
and Creat Database with CHARACTER ASCII,PageSize 4096
1.How can i select column value?
IID I1 I2 I3
1 ff 05 34
select * from t1 where I1='ff' ?
2.Import Data
i Create Files as HEX:
like FileName 'c:\1.data'
01 00 00 00 00 00 00 00 FF 05 34 ... //200
02 00 00 00 00 00 00 00 1C 02 00 ... //200
CREATE TABLE EXT1 EXTERNAL FILE 'c:\1.data'
(IID BIGINT,
I1 CHAR(1) CHARACTER SET OCTETS,
I2 CHAR(1) CHARACTER SET OCTETS
.... //200 Columns
);
insert into t1 select * from ext1;
Now in my PC£¨windows 7 64+Firebird 2.5£©
about 90 seconds can insert 2,000,000 records.
so, how can become faster£¿
firebird.conf setting is:
ExternalFileAccess = FULL
DefaultDbCachePages=4096
MaxUnflushedWrites=100
MaxUnflushedWriteTime=5
DatabaseGrowthIncrement = 134217728