469,327 Members | 1,238 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

Group by slow at first time in sql server

Hi Sir,

I need your help, here is my query, it is slow first time

Expand|Select|Wrap|Line Numbers
  1. SELECT  COUNT(1) AS Results FROM ImportShipmentNew2013 
  2. WHERE CONTAINS(ProductDescription, 'neem') --AND (@HSCode='' OR HSCode = @HSCode )
  3. GROUP BY ForeignCountry
(69 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'ImportShipmentNew2013'. Scan count 0, logical reads 721107, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.

(1 row(s) affected)

Please suggest to index create to improve performance
Mar 25 '14 #1
1 1132
Rabbit
12,516 Expert Mod 8TB
create a full text index on your ProductDescription field and an index on your group by.
Mar 25 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Steve Bishop | last post: by
1 post views Thread by BK Kim | last post: by
9 posts views Thread by Tommy Martin | last post: by
3 posts views Thread by Bob Graham | last post: by
3 posts views Thread by Marlene A. Roman | last post: by
3 posts views Thread by Torben Laursen | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.