Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 app slow.

Author  Topic 

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-04-15 : 01:28:52
A vendor's application is performing slow. Vendor tested it in QA and it's slow. End-users run it in PRD and it's slow. The application calls SP1, and SP1 calls SP2. Inside SP1 has a cursor. I believe as the db gets larger. The application is going to be even slower. What can I suggest to the vendor in order to fix it? Tell them to re-write the application code? Eliminate cursor?

Thanks

pravin14u
Posting Yak Master

246 Posts

Posted - 2008-04-15 : 04:02:03
Removing Cursor is a good idea but there are many other factors too hwich affect the performance

Prakash.P
The secret to creativity is knowing how to hide your sources!
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-04-15 : 12:41:44
I know. But listen the vendor tested the application1 using the same database in his company's pc and it's working OK for him. That means it's not the application1.
We have lots of SP and applications running in our QA and PRD and they seem to be OK besides this evil application1. what could be wrong? Only experts (5+ years) pls.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-15 : 13:11:43
First have a look at performance of SP1 in query analyser/mgmnt studio. Analyse its execution plan. if its really the bottleneck think of rewriting the logic by removing cursor.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-04-15 : 13:19:10
oh i just love this part:
> Only experts (5+ years) pls.


the solution to your problem depends on what the cursor is doing. simple as that. tells us what it does and then we can help you.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-15 : 13:37:51
Just because the vendor tested the application on the same database doesn't mean that the problem isn't with the application. There's not much that we do to help except the normal performance troubleshooting steps:

1. Run SQL Profiler/SQL Trace to collect slow running queries, optimize as needed
2. Analyze execution plans and see if any indexes need to be added
3. Run Performance Monitor to determine if there is a hardware bottleneck
4. Redesign the database schema
5. Eliminate all bad code

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-04-15 : 14:27:55
hey listen, I removed all the nonclustered indexes as they do not have 95% selectivity. Not sure if this improved the speed.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-15 : 14:30:13
I'm sure it decreased the speed.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2008-04-15 : 14:33:57
Are you saying the article i read its wrong.
http://www.sql-server-performance.com/tips/nonclustered_indexes_p1.aspx

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-15 : 14:37:46
It isn't wrong, but it also is making an assumption that 95% is correct. You should view the execution plans to determine what gets used. I believe that there is a report in the performance dashboard which shows if an index ever gets used or not. You can also use that to determine what to drop.

I would highly recommend not dropping all indexes just because the selectivity is not over 95%. That's only one thing to consider when determining what indexes to create/drop.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -