Re: Need help with hint syntax in SQL Server 2000



On Mon, 15 Dec 2008 12:16:40 -0800 (PST), Mark D Powell wrote:

Anyone able to explain why SQL Server was
unable to recognize that it shoul push the where clause condition down
to the table access?

Hi Mark,

Based on your very generic description, the only thing I can say is that
I would first check if the UNION ALL has something to do with it.

For more specific comments, though, we need more information. For
starters, we need the design of all tables and views involved (posted as
CREATE TABLE and CREATE VIEW statements, including all properties,
constraints, and indexes). Some sample data might help as well, though
in this case I would definitely want to see an execution plan (captured
with SET SHOWPLAN_ALL ON) and information about numbers of matching rows
in the various tables.

You can of course replace table and column names to protect sensitive
data, and you can also (in fact, I even encourage you to) simplify the
problem as far as possible.

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
.



Relevant Pages

  • Re: Need help with hint syntax in SQL Server 2000
    ... unable to recognize that it shoul push the where clause condition down ... Hugo Kornelis, SQL Server MVP ... My SQL Server blog:http://sqlblog.com/blogs/hugo_kornelis ... Thank you both for the replies. ...
    (comp.databases.ms-sqlserver)
  • Re: Query for search engine
    ... > relational database and is not restricted to SQL server. ... > our internet site and SQL for our intranet sites. ... >> Could you please post some DDL, sample data and expected result? ...
    (microsoft.public.sqlserver.programming)
  • Access SUMs Full Column When Using Subquery
    ... I jumped over to SQL Server, and it gave me the results I wanted, so ... Sample Data: Students_02272005_1 ... SELECT clause due to conditions specified on the subquery's WHERE ... Stud_ID Lesson PercentAbove5 ...
    (microsoft.public.access.queries)
  • Re: SQL: If one item is false, I need a false returning
    ... have another field, RepairAuthType. ... Some well-chosen rows of sample data, ... My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis ...
    (microsoft.public.sqlserver.programming)
  • Re: how to conver nvarchar with value like(12.23) to time (12:23)
    ... Can you please give us a script of some sample data to try out? ... Pro SQL Server 2000 Database Design - ... > "Arithmetic overflow error converting expression to data type datetime" ... > INSERT INTO TourItemsTemp (FromTime, ToTime, TimeCodeID, ...
    (microsoft.public.sqlserver.programming)