|
Posted by Erland Sommarskog on 12/29/06 13:09
(StevePBurgess@gmail.com) writes:
> Hi - and thanks for the feedback.
>
> If I run the query with against just one of the 1-many-many-1 table
> relationships it works perfectly. The issue, I think, is having two
> OR-ed together. When running against one set (e.g. just keywords and
> not attachments) the search is very quick.
The more tables you throw into the mix, the more tables there are to search.
If you want me or anyone else to say somehting more useful, we would need to
see:
o CREATE TABLE and INDEX statements for the tables.
o The fast query (and repeat the slow while you are it).
o The output from SET STATISTICS PROFILE ON when you run the two from
a query tool. This output is very wide, so put in an attachment if
possible.
o Which version of SQL Server you are running.
--
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]
|