|
Posted by Erland Sommarskog on 11/28/07 07:29
Don Li (tatata9999@gmail.com) writes:
> I've added a non-clustered index to the targetTBl(article_content,
> article_id),
> article_content is varchar(896) and article_id is int. On collation
> for article_content, it uses "database default", which is SQL_Latin1.
OK, there are some spetacular differences between SQL collations + varchar
and Windows collations or anything with nvarchar with that type of query.
> However, the scan is still taking too long, insertion of about 12
> rows took about 7000ms. And I even added index hint. It's odd though
> yesterday and the day before yesterday, the same query ran at least
> 100% faster.
But it's not really the insertion that takes time, is it? I mean, if you
the SELECT alone, it does not respond in 70 milliseconds, does it?
Have you considered using full-text indexing?
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|