You are here: Re: Extracting and joining header from denormalized table « MsSQL Server « IT news, forums, messages
Re: Extracting and joining header from denormalized table

Posted by Erland Sommarskog on 10/22/12 11:33

Thomas R. Hummel (tom_hummel@hotmail.com) writes:
> I've also used EXISTS and IN in various queries. No matter which method
> I use, the query plans tend to want to do a clustered index scan on the
> target table (actually a partitioned view partitioned by year). The
> number of headers that were in the target but not the header file this
> month was about 42K out of 1M.

Did you try using an index hint?

But wait, you can't force an index on the view, as the view does not
have any indexes. And maybe there lies the problem. What happens if
you instead join directly to the underlying tables?


--
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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация