Solved

Perfomance not increased after rebuild

Posted on 2014-03-09
6
153 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 35

Expert Comment

by:David Todd
Comment Utility
Hi,

Does the procedure in question need to be recompiled?

HTH
  David
0
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

10 Experts available now in Live!

Get 1:1 Help Now