January 7, 2007 at 4:15 pm
In my working environment, all the data access through view and each view consists of alot of left outer joins.
But there is alot of problems in query operations ( slow query).
How can i make fast query in that situation ? I make some indexes in base tables and try to run but no effect in performance of query.
I run DBCC utilities, update statistics of databases. But no changes in speed.
how can i optimize views consists of left outer joins ?
Is there any alternatives for such views, that can make faster queries in large tables ?
Please help me immediately with good solutions.
AKP
January 7, 2007 at 5:02 pm
The only solution I can give is to make sure that the query returns as little rows as humanly possible. Try converting the left joins to inner join where possible.
Can you give us an example of a query you need to tune?
Please post all of the following (DDL with indexes, query, some sample data and expected output, execution plans)
January 7, 2007 at 10:19 pm
Outer joins are not always the culprit in slow SQL... joining a bunch of tables and returning to0 many columns usually is. Also, the reason why adding indexes isn't helping is probably because of the way the joins were made... are they "sargeable" where they can actually use an index? Do you have column names in the joins that are embedded in any type of formula including ISNULL?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply