Data insertion too too slow...
- From: Don Li <tatata9999@xxxxxxxxx>
- Date: Tue, 27 Nov 2007 14:06:59 -0800 (PST)
Hi,
Env is ms sql server 2000.
ddl:
create table srchPool(tid int primary key, taid int, s tynyint, uid
tynyint);
-- and sql server automatically creates a clustered index for the pk
dml:
insert into srchPool(taid,s,uid)
select article_id, 99, 1484
from targetTBL
where article_content LIKE '% presentation %';
insert into srchPool(taid,s,uid)
select article_id, 55, 1484
from targetTBL
where article_content LIKE '% demonstration %';
-- a few more similar queries ...
The above insertion query TOOK about 2000ms to execute, too too slow,
would be much faster if I insert the data sets into a temp tbl like
select article_id, 99, 1484 into #srchPool(taid,s,uid)
from targetTBL
where article_content LIKE '% presentation %';
-- once its use is finished and drop it
?
Many thanks.
.
- Follow-Ups:
- Re: Data insertion too too slow...
- From: Erland Sommarskog
- Re: Data insertion too too slow...
- Prev by Date: Clustering, Security, Performance, Load Balance
- Next by Date: Re: many "or" operation make system choose incorrect index
- Previous by thread: Clustering, Security, Performance, Load Balance
- Next by thread: Re: Data insertion too too slow...
- Index(es):
Relevant Pages
|