Subject | RE: Insert into Large Table is slowly! |
---|---|
Author | |
Post date | 2013-09-05T16:24:16Z |
thanks
the slower insert is:
insert into table1 select *from tableTemp
jimmy
--- In firebird-support@yahoogroups.com, <Sean@...> wrote:> Hello, every body!Which INSERT is getting slower? (You have 2 of them)
> Â I have a 180GB database. and have a large table in it. table's DDL is:
> Create Table Table1
> (
> Â Â f_MeterID Integer,
> Â Â f_CMDID smallInt,
> Â Â f_Time timestamp,
> Â Â f_Value Numric(12,2),
> Â Â f_RecTime Timestamp
> );
> Create Index idx_Table1 on(f_MeterID, f_CMDID, f_Time)
>
> about 50,000 rows be inserted every hour. about 1.2 millions rows be
> inserted every day. about 500 millions rows every year.
>
> I insert data use follow:
> 1. start a transaction
> 2. Insert a batch records into temp table TableTemp, It's structure like table1
> 3. Insert into Table1 select * from TableTemp
> Â Â Delete Data From TableTemp
> Â Â (about 30,000 record every tiime)
> 4. commit transaction
>
> but now, insert data become very slowly.
Sean