Subject | update optimization problem |
---|---|
Author | Germán Balbi |
Post date | 2014-10-29T12:42:16Z |
Hi.
in firebird 2.5
Simple descrip tables
table_ud
ud_id integer not null primary key
field_ud varchar(6)
row count: 383322
table_tmp
ud_id integer
cnd integer
index (cnd)
row count: 617
UPDATE table_ud ud
SET ud.field_ud = '201401'
WHERE ud.ud_id in (SELECT t.ud_id FROM table_tmp t where t.cnd = 2)
stadistic
table_ud
read no index: 383322
Why?
This table can grow to millions of rows
How do I optimize it ?
Thank
Germán from Buenos Aires