?
Solved

Index Tuning Wizard Problem

Posted on 2006-07-01
4
Medium Priority
?
402 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

765 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