Download presentation
Presentation is loading. Please wait.
Published byJason Pope Modified over 9 years ago
1
DATABASE PERFORMANCE COOKBOOK
2
You’ve completed CSCI 6442 (congratulations!) You have an MS from GWU (congratulations again!) You’re working on a project using a DBMS (congrats) And they think of you as a database guru (congrats?) And now—a programmer says “I’m having performance problems.” The boss, of course, tells her to come see you! How to proceed? SCENARIO
3
How loaded is the server? Which DBMS is being used? How does the application use SQL? Identify the queries that are slow Review the use of SQL—can SQL do more? Look at the plan for each one First—check for existence of indexes and their use in the plan Then—general review of the query and the plan Recommend changes to indexes and query as appropriate Get performance test results right away WHERE TO LOOK
4
The problem may be at the server Find that out first Server may be overloaded Server may not be administered effectively Server may not have enough capacity Sometimes test server does not have production capacity SERVER LOAD
5
If either the IBM, Sybase or Oracle family is being used, you can work with it If MySQL is used, check that NODB is being used. Even then, you have limited options for optimization DBMS CHOICE
6
Applications may use SQL for put and get, do all data manipulation in the application They may issue many SQL statements to get a result that you can obtain with a single statement Often programmers will just copy another programmer’s SQL to get access to the database, won’t understand a thing Huge performance gains are available from fixing these problems APPLICATION USE OF SQL
7
Usually some SQL statements stand out as performance problems If they’re all slow, the problem may be in the database server or the application server IDENTIFY PROBLEM QUERIES
8
Study the use of SQL in each problem query Can more function be added to the database and removed from the application? This can improve performance Look at indexes and their use in the plan Test alternative formulations of the statement for performance Recommend changes in SQL statement, indexes WHERE TO LOOK
9
Carry out and document results of performance tests on your improvements right away You want a quantitative record of what you accomplished WHERE TO LOOK
10
Share the results of the performance improvement, with due modesty You are a hero, take the credit TAKE THE CREDIT
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.