Data insertion too too slow...



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.

.



Relevant Pages

  • Re: seeing views in wizard
    ... The problem with views as destinations is that you can only insert into 1 ... CREATE TABLE t2(id int primary key not null, ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. ... I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Alison" wrote in message ...
    (microsoft.public.sqlserver.dts)
  • Re: Need help on a select statement using MYSQL ^.^
    ... > person_id int primary key ... > mood ... Well "business problem" may not be the right world, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Data insertion too too slow...
    ... create table srchPool(tid int primary key, taid int, s tynyint, uid ... -- and sql server automatically creates a clustered index for the pk ... from targetTBL ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: subquery problem, wrong reference in the subquery?
    ... Columnist, SQL Server Professional ... The query still runs and give out results. ... create table t2 (rowid int primary key, rowname varchar(100)) ...
    (microsoft.public.sqlserver.programming)
  • Re: Compare Insert vs Update
    ... Columnist, SQL Server Professional ... On compairing Insert vs Update, which statement causes more overhead to the ... If i have a Table(col1 int primary key) ...
    (microsoft.public.sqlserver.programming)