Solved

Perfomance not increased after rebuild

Posted on 2014-03-09
6
154 Views
Last Modified: 2014-03-11
I have  rebuild the transaction since index  average _fragmentation  reached 99.88%.
The table has more than 30,00,000  records.  The table has on clusterindex column
Before  rebuilding i run query with tran.Id  range search it took  .40 seconds
Logical reads : 59615
Physica Reads: 0
CPU Time: 3307ms
Elapsed Time: 42561ms

After rebuilding the table index  average _fragmentation   went to 0.01%. But i did not see any difference in the query performance.
It took .40 seconds
Logical reads : 59615
Physica Reads: 0
CPU Time: 2949ms
Elapsed Time: 40942ms

select  *  from daily_sales where salesid>'106545'
and salesid<'878989789'

salesid is char data type

query returns: 1145537 rows

Why i did not see any performance after rebuild the table ?
0
Comment
Question by:Varshini S
6 Comments
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 334 total points
ID: 39916057
Assuming that salesid is character data and you have the clustered index on this column then the length of time has to do with the number of rows returned.  In other words you do not have a SQL problem but rather a network problem.  Do the following and see if I am right:
SELECT  COUNT(*)
FROM    daily_sales
WHERE   salesid > '106545'
        AND salesid < '878989789'

Open in new window

0
 
LVL 11

Assisted Solution

by:John_Vidmar
John_Vidmar earned 166 total points
ID: 39917804
Run a query-execution-plan to see the indexes being used, and where the expensive work is being performed (try to optimize the expensive steps, if possible).

Would using BETWEEN (or >= and <=) change anything?  I read that some optimizers don't like < and >.
0
 

Author Comment

by:Varshini S
ID: 39919702
my attempt is proof reindex or rebuild improve the performance. I would like to know if there is any improvement after reindex or rebuild table.
I thought it should be little bit faster after this process. But I did not see the difference. Why ?
0
[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

 
LVL 35

Expert Comment

by:David Todd
ID: 39919936
Hi,

Does the procedure in question need to be recompiled?

HTH
  David
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39922315
But I did not see the difference. Why ?
I thought I had explained that to you.  In other words the answer is probably The experts told me “you can’t do that”. What do I do now?
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 334 total points
ID: 39922339
my attempt is proof reindex or rebuild improve the performance
You are not serious are you?  The time went from 42561ms to 40942ms that represents a 4% change which obviously was not enough for you or are you saying now that it was enough.  So I stand by my statement: You do not have a SQL problem but rather a network problem.

Did you even try my suggestion?
0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

23 Experts available now in Live!

Get 1:1 Help Now