Solved

Index Tuning Wizard Problem

Posted on 2006-07-01
4
388 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 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

733 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