473,651 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Index Tuning Wizard - headache

Hi,

I am having problems getting anything useful out of the index tuning
wizard.

I have created a table and inserted data into it. When i run the index
tuning wizard i expect 2 indexes to be recommended so the book says
(Index011 with a key on the uniqueid column and a non clustered index
named table02 with a key on the col03 and LongCol02)
Instead i get nothing being recommended.

What am i doing wrong????

Please help
Maryam
if exists (select name from dbo.sysobjects where name ='table01' and
type ='u')
drop table table01
create table table01(uniquei d int identity, longcol02 char(300)
DEFAULT 'THIS IS THE DEfault column',
col03 char(1))
go

declare @counter int
set @counter =1
while @counter<=1000
begin
insert table01 (col03) values('a')
insert table01 (col03) values('b')
insert table01 (col03) values('c')
insert table01 (col03) values('d')
insert table01 (col03) values('e')
insert table01 (col03) values('f')
set @counter=@count er+1
end
Jul 20 '05 #1
3 2903

"Maryam" <ma*********@ho tmail.com> wrote in message
news:41******** *************** ***@posting.goo gle.com...
Hi,

I am having problems getting anything useful out of the index tuning
wizard.

I have created a table and inserted data into it. When i run the index
tuning wizard i expect 2 indexes to be recommended so the book says
(Index011 with a key on the uniqueid column and a non clustered index
named table02 with a key on the col03 and LongCol02)
Instead i get nothing being recommended.

What am i doing wrong????

Please help
Maryam
if exists (select name from dbo.sysobjects where name ='table01' and
type ='u')
drop table table01
create table table01(uniquei d int identity, longcol02 char(300)
DEFAULT 'THIS IS THE DEfault column',
col03 char(1))
go

declare @counter int
set @counter =1
while @counter<=1000
begin
insert table01 (col03) values('a')
insert table01 (col03) values('b')
insert table01 (col03) values('c')
insert table01 (col03) values('d')
insert table01 (col03) values('e')
insert table01 (col03) values('f')
set @counter=@count er+1
end


What sort of queries (workload) did you trace to provide to the wizard?

Simon
Jul 20 '05 #2
1. What batch of statements are you feeding the the Index Tuning Wizard
on which to base its optimizations?

2. In your example, each page of the table (8060 bytes) would be able to
hold 25 or 26 rows. You only insert 6 rows, which means the table has
only one page. In that case there is not much to optimize...

Gert-Jan
Maryam wrote:

Hi,

I am having problems getting anything useful out of the index tuning
wizard.

I have created a table and inserted data into it. When i run the index
tuning wizard i expect 2 indexes to be recommended so the book says
(Index011 with a key on the uniqueid column and a non clustered index
named table02 with a key on the col03 and LongCol02)
Instead i get nothing being recommended.

What am i doing wrong????

Please help
Maryam

if exists (select name from dbo.sysobjects where name ='table01' and
type ='u')
drop table table01
create table table01(uniquei d int identity, longcol02 char(300)
DEFAULT 'THIS IS THE DEfault column',
col03 char(1))
go

declare @counter int
set @counter =1
while @counter<=1000
begin
insert table01 (col03) values('a')
insert table01 (col03) values('b')
insert table01 (col03) values('c')
insert table01 (col03) values('d')
insert table01 (col03) values('e')
insert table01 (col03) values('f')
set @counter=@count er+1
end


--
(Please reply only to the newsgroup)
Jul 20 '05 #3
Hi

Very strange, it worked today.

I tried again today and it worked, im not sure why. (my table only
has 3000 records)

Initially i created a trace file "trace01" based on the
SQLProfilerStan dard template and ran the trace whilst executing the
code to

create the table, insert the data and run the select statements.

select col03, longcol02 from table01 where col03='a'
select uniqueid,longco l02 from table01 where unqueid=10000
select * from table01 where uniqueid between 5000 and 10000
go

I then opened the index tuning wizard, kept the standard settings
(tried thorough) and selected the "trace01" template into the workload
file, then selected table01 and continued.

Maryam
Gert-Jan Strik <so***@toomuchs pamalready.nl> wrote in message news:<40******* ********@toomuc hspamalready.nl >...
1. What batch of statements are you feeding the the Index Tuning Wizard
on which to base its optimizations?

2. In your example, each page of the table (8060 bytes) would be able to
hold 25 or 26 rows. You only insert 6 rows, which means the table has
only one page. In that case there is not much to optimize...

Gert-Jan
Maryam wrote:

Hi,

I am having problems getting anything useful out of the index tuning
wizard.

I have created a table and inserted data into it. When i run the index
tuning wizard i expect 2 indexes to be recommended so the book says
(Index011 with a key on the uniqueid column and a non clustered index
named table02 with a key on the col03 and LongCol02)
Instead i get nothing being recommended.

What am i doing wrong????

Please help
Maryam

if exists (select name from dbo.sysobjects where name ='table01' and
type ='u')
drop table table01
create table table01(uniquei d int identity, longcol02 char(300)
DEFAULT 'THIS IS THE DEfault column',
col03 char(1))
go

declare @counter int
set @counter =1
while @counter<=1000
begin
insert table01 (col03) values('a')
insert table01 (col03) values('b')
insert table01 (col03) values('c')
insert table01 (col03) values('d')
insert table01 (col03) values('e')
insert table01 (col03) values('f')
set @counter=@count er+1
end

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1501
by: frank niedermeyer | last post by:
Hello Newsgroup ! I'm working with SQL Server 7.0 and Access 2000 . I build some stored procedures and indexes to enhance the performance of my queries. Now there is another application (blackbox) which imports new data to my only database table. Once it took 1 ms for one file (1kb) today it takes 7 min. I know there is something wrong. Is it
0
1274
by: NathanG | last post by:
Hi, I've run the (SQL2K) Index Tuning Wizard against our 50GB database and it has recommended changes that will produce a "-3506%" improvement iin performance. The recommendations include a lot of indexes to be dropped and a few new ones to be created, in the Analysis - Query Cost Report screen all of the indexes shown have a zero or negative percent improvement (e.g. -96133%).
13
5674
by: LUIS FAJARDO | last post by:
I have the following sintax: Select * From Inventory Where PartId = Coalesce(v_PartId, PartId) this type of query is used within an store procedure that provide the v_PartId parameter, the data type for PartId on the database is CHAR(25) same for the parameter. The problem that I have is that this query uses a FULL SCAN to the table instead of using the PartId index
24
2937
by: Henrik Steffen | last post by:
hello all, on my master-db-server i'm running postgres 7.4.1, and I have got two slave-servers running postgres 7.4.2 running the following query on the master-server (7.4.1) delivers: explain analyze select * from foo where bar like '0101%' and foobar like 'top%';
1
2051
by: serge | last post by:
I am reading "SQL Server Query Performance Tuning Distilled", on page 104 it talks about one of the index design recommendations which is to choose the column that has very high selectivity of values instead of a column that has very few selectivity of values. My question is if I have currently indexes on my tables that have 1, 2, 3, 4, ... values only on thousands of rows, are these nonclustered indexes pretty much useless indexes that...
0
1156
by: uzi | last post by:
Hi Does someone know how to embed the audio and video tuning wizard into an application? I have noticed that the same component is used by messenger and Microsoft one note.
2
4003
by: Deepa Jeevagan | last post by:
Hi, The application I am currently working on is developed in Oracle 8i. I have a table which has a nullable numeric column say CustNo. This column has an index defined on it and oracle uses the index when I am using this column with a numeric operator ( eg < , = etc). However if I try to use the LIKE operator on this clause Oracle refuses to use the index. I have tried giving the index hint also but that also does not work. I have a...
4
3080
by: Tommy Hayes | last post by:
Hello all, I want to use the SQL Server 2005 Tuning Advisor on our database, and I'm hoping someone here can just confirm the steps for me. We have a 10GB database that has a number of applications hitting it constantly, all performing many SELECTs, INSERTs and UPDATEs. Are the following the steps I need to take? 1. Stop all the applications hitting the database. 2. Make a backup of the database.
2
2493
by: BD | last post by:
Hi, all. My background is more Oracle than db2. My skills at SQL tuning are quite limited. I'm running 8.2 on Windows. I'm tasked with some SQL optimization, and am doing some explain plans on various queries.
0
8273
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8789
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8693
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6156
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4279
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2694
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1584
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.