Subject | FB1.5.2 100 % CPU |
---|---|
Author | nagypapi |
Post date | 2006-09-22T19:01:44Z |
Maybe this is outdated:
I am using fbserver1.5.2 on a winxp machine, and was browsing through
my database.
The following sql statement worked perfectly in a few seconds, and
gave back 1 result:
select min(id) from zaras_futar_forgalmak where datum in
(select datum from zaras_futar_forgalmak group by datum
having count(distinct id)>1)
but the following caused a 100% CPU load:
delete from zaras_futar_forgalmak where id in
(select min(id) from zaras_futar_forgalmak where datum in
(select datum from zaras_futar_forgalmak group by datum
having count(distinct id)>1)
)
The table ddl:
CREATE TABLE ZARAS_FUTAR_FORGALMAK (
ID BIGINT,
PERSONEL_ID BIGINT,
FUTAR_NEV VARCHAR(50),
CIMEK INTEGER,
FUTAR_FORGALOM BIGINT,
KUPON_DB INTEGER,
KUPON_FT BIGINT,
NEM_VETTEK_AT BIGINT,
SZAMLAK BIGINT,
ETKEZESI_JEGYEK BIGINT,
TULORA_CIMEK INTEGER,
FELAR INTEGER,
DATUM TIMESTAMP,
UTOLAG_ADOTT_KEDVEZMENY DOUBLE PRECISION
);
The table has approximately 2000-5000 records
I waited a few minutes, but it didn't finish, should I have waited more?
John
I am using fbserver1.5.2 on a winxp machine, and was browsing through
my database.
The following sql statement worked perfectly in a few seconds, and
gave back 1 result:
select min(id) from zaras_futar_forgalmak where datum in
(select datum from zaras_futar_forgalmak group by datum
having count(distinct id)>1)
but the following caused a 100% CPU load:
delete from zaras_futar_forgalmak where id in
(select min(id) from zaras_futar_forgalmak where datum in
(select datum from zaras_futar_forgalmak group by datum
having count(distinct id)>1)
)
The table ddl:
CREATE TABLE ZARAS_FUTAR_FORGALMAK (
ID BIGINT,
PERSONEL_ID BIGINT,
FUTAR_NEV VARCHAR(50),
CIMEK INTEGER,
FUTAR_FORGALOM BIGINT,
KUPON_DB INTEGER,
KUPON_FT BIGINT,
NEM_VETTEK_AT BIGINT,
SZAMLAK BIGINT,
ETKEZESI_JEGYEK BIGINT,
TULORA_CIMEK INTEGER,
FELAR INTEGER,
DATUM TIMESTAMP,
UTOLAG_ADOTT_KEDVEZMENY DOUBLE PRECISION
);
The table has approximately 2000-5000 records
I waited a few minutes, but it didn't finish, should I have waited more?
John