Subject | [firebird-support] problem with converting tables |
---|---|
Author | mat |
Post date | 2005-07-15T09:24:57Z |
I'm working with Firebird 1.5
I need to convert a little structure of my tables.
Structure of one of that table is below:
CREATE TABLE KORESPONDENCJALOG
(
ID INTEGER NOT NULL,
NUMBER INTEGER,
CORRESPONDENCE_ID INTEGER NOT NULL,
CUSTOMER_ID INTEGER NOT NULL,
ADDRESSEE_ID INTEGER NOT NULL,
STAGE_ID INTEGER NOT NULL,
TYPE_ID INTEGER,
DELETED INTEGER,
MODIFIED INTEGER,
ARC INTEGER,
ADDRESSE_COMPANY_ID INTEGER,
GROUP_COMPANY_ID INTEGER,
SYNC INTEGER,
NOTE BLOB SUB_TYPE TEXT SEGMENT SIZE 80 CHARACTER SET WIN1250,
CORRESPONDENCELOGROOT INTEGER,
TASK_ROOT_ID INTEGER,
EXXID INTEGER,
OPERATOR_ID INTEGER,
DEPARTMENT_ID INTEGER,
FAKTTIMER INTEGER,
ACTION_DATE TIMESTAMP,
PRIMARY KEY (ID)
);
that is the structure of the second one
CREATE TABLE CORRESPONDENCE
(
ID INTEGER NOT NULL,
ACTIONTYPE_ID INTEGER NOT NULL,
ACTION_DATE TIMESTAMP,
STATUS INTEGER,
EDIT INTEGER,
ACTIONKIND_ID INTEGER NOT NULL,
REGISTRATION_DATE TIMESTAMP,
OPERATOR_ID INTEGER,
DELETED_ID INTEGER,
TOPIC VARCHAR(250) CHARACTER SET WIN1250 COLLATE PXW_PLK,
MSGID VARCHAR(250) CHARACTER SET WIN1250,
IDROOT INTEGER,
SYNC INTEGER,
ATTACHMENTS INTEGER,
ARC INTEGER,
DEPARTMENT_ID INTEGER,
PRIMARY KEY (ID)
One of my query takes really a lot of time, generally i can say that
it's impossible to execute it:)
it goes below:
update correspondence
set arc = 1 where id in (select correspondence_id from correspondencelog
where arc = 1);
commit;
does anyone know what may couse that problem?
does anyone know how to find out what generally firebird engine is
executing in any particular moment?
thanks in advance for any help
mat
I need to convert a little structure of my tables.
Structure of one of that table is below:
CREATE TABLE KORESPONDENCJALOG
(
ID INTEGER NOT NULL,
NUMBER INTEGER,
CORRESPONDENCE_ID INTEGER NOT NULL,
CUSTOMER_ID INTEGER NOT NULL,
ADDRESSEE_ID INTEGER NOT NULL,
STAGE_ID INTEGER NOT NULL,
TYPE_ID INTEGER,
DELETED INTEGER,
MODIFIED INTEGER,
ARC INTEGER,
ADDRESSE_COMPANY_ID INTEGER,
GROUP_COMPANY_ID INTEGER,
SYNC INTEGER,
NOTE BLOB SUB_TYPE TEXT SEGMENT SIZE 80 CHARACTER SET WIN1250,
CORRESPONDENCELOGROOT INTEGER,
TASK_ROOT_ID INTEGER,
EXXID INTEGER,
OPERATOR_ID INTEGER,
DEPARTMENT_ID INTEGER,
FAKTTIMER INTEGER,
ACTION_DATE TIMESTAMP,
PRIMARY KEY (ID)
);
that is the structure of the second one
CREATE TABLE CORRESPONDENCE
(
ID INTEGER NOT NULL,
ACTIONTYPE_ID INTEGER NOT NULL,
ACTION_DATE TIMESTAMP,
STATUS INTEGER,
EDIT INTEGER,
ACTIONKIND_ID INTEGER NOT NULL,
REGISTRATION_DATE TIMESTAMP,
OPERATOR_ID INTEGER,
DELETED_ID INTEGER,
TOPIC VARCHAR(250) CHARACTER SET WIN1250 COLLATE PXW_PLK,
MSGID VARCHAR(250) CHARACTER SET WIN1250,
IDROOT INTEGER,
SYNC INTEGER,
ATTACHMENTS INTEGER,
ARC INTEGER,
DEPARTMENT_ID INTEGER,
PRIMARY KEY (ID)
One of my query takes really a lot of time, generally i can say that
it's impossible to execute it:)
it goes below:
update correspondence
set arc = 1 where id in (select correspondence_id from correspondencelog
where arc = 1);
commit;
does anyone know what may couse that problem?
does anyone know how to find out what generally firebird engine is
executing in any particular moment?
thanks in advance for any help
mat