Solved

Index Tuning Wizard Problem

Posted on 2006-07-01
4
381 Views
Last Modified: 2008-02-01
I am trying to use Index Tuning Wizard for one of my Database, when i give the Wizard SQL Script i want database to check. It gives me an error as following:-

"The workload does not contain any events or queries that can be tuned against current database. Check to see the trace contains valid events or SQL script contains valid queries and you are tuning against the right database."

My SQL Query is as following:-

SELECT FZE_MATRIX_PL_QTY.OR03001,
FZE_MATRIX_PL_QTY.QTY,
FZE_MATRIX_PL_QTY.QTY/isnull(Factor,1) as Picks,
FZE_MATRIX_PL_QTY.OR03005,
FZE_MATRIX_PL_QTY.OR03002,
FZE_MATRIX_PL_QTY.OURSTATUS,
FZE_MATRIX_PL_QTY.LineValue,
case when year(FirstConfDelDate) =1900 then getdate()+3650 else FirstConfDelDate end as FirstConfDelDate ,
FZE_MATRIX_PL_QTY.SCALAPLNO,
FZE_MATRIX_PL_QTY.ADDWHEN,
FZE_MATRIX_PL_QTY.Priority,
FZE_MATRIX_PL_QTY.Country,
EXCEEDFlag,
WhenToShip,
NbOfLines,
SCALA_Status,
EXCEEDLineStatus,
EXCEEDSO,
EXCEEDOrderStatus
FROM
scalaDB.dbo.FZE_MATRIX_PL_QTY FZE_MATRIX_PL_QTY
left outer join FZE_QS_2005_BASE_TABLE on FZE_MATRIX_PL_QTY.OR03001=FZE_QS_2005_BASE_TABLE.SONumber
AND FZE_MATRIX_PL_QTY.OR03002 = FZE_QS_2005_BASE_TABLE.LineNumber
left outer join FZE_SO_TO_SHIP_TODAY on
FZE_SO_TO_SHIP_TODAY .SONumber =FZE_MATRIX_PL_QTY.OR03001
inner join SC010100 on SC01001=OR03005
left outer join UNITS on SC01035=UnitCode
left outer join FZE_PACKING_STATUS on OR03001=SO COLLATE SQL_Latin1_General_CP437_BIN and OR03002=ExternLineNo COLLATE SQL_Latin1_General_CP437_BIN and
FZE_MATRIX_PL_QTY.SCALAPLNO = SCALAPL
COLLATE SQL_Latin1_General_CP437_BIN
where ((FZE_MATRIX_PL_QTY.OURSTATUS='O') OR (FZE_MATRIX_PL_QTY.OURSTATUS='P')
) and FZE_MATRIX_PL_QTY .FLAG='O'



0
Comment
Question by:dduser
  • 3
4 Comments
 
LVL 28

Expert Comment

by:imran_fast
ID: 17025997
you have to change the query to ANSI format Inorder to use index tuning wizard.
0
 
LVL 28

Expert Comment

by:imran_fast
ID: 17026016
take out COLLATE SQL_Latin1_General_CP437_BIN  from the above and then try
also i think you are running the query across different databases scalaDB.dbo should be taken out.
0
 
LVL 9

Author Comment

by:dduser
ID: 17030848
Hi Imran,

I have removed Collate stuff from my query and also removed scalaDB.dbo. Still this doesn't work can you please help me out why is this not working.

dduser
0
 
LVL 28

Accepted Solution

by:
imran_fast earned 500 total points
ID: 17035276
Even if you remove scalaDB.dbo the FZE_MATRIX_PL_QTY FZE_MATRIX_PL_QTY  table wont be there in current database so it wont work. any how let me suggest indexes for the above query

on FirstConfDelDate column in which ever tabel it belongs

should have index on the follwoing column in table FZE_MATRIX_PL_QTY
1.OURSTATUS
2.FLAG
3.OR03001
4.OR03002

should have index on the follwoing column in table FZE_QS_2005_BASE_TABLE
1.SONumber
2.LineNumber

FZE_SO_TO_SHIP_TODAY
1.SONumber

UNITS
1.unitcode

FZE_PACKING_STATUS
1.SO
2.ExternLineNo
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now