Solved

Perfomance not increased after rebuild

Posted on 2014-03-09
6
160 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
[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
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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

729 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