Monday, September 6, 2010

Database performance tuning: in-depth

I. Introduction
This text works is the performance of the second database performance tuning. The index on an article about that performance tuning database performance tuning is the basis of (). This stresses that the in-depth understanding of single-table operation planning, is a powerful database performance tuning props.

Query results are not planning to run a variety of options, how to select the efficient operation of planning? Up dream database, database, sql database and are based on cost-based query optimization, planning to stop running on the alternative rate, select the most were planning to stop people running the smallest run. 
This part of the contents, I will follow-up of the few works to stop a detailed text description. Prior to this, we first understand the database needs to grasp how to run the plan. This version works only say that the operation involves a single table operations planning.

Dream up a database, oracle database, sql server database, no results appear to be planning to run the statement. I have the detailed planning of the operation of these three database planning, there is no essential difference between the three. Therefore, the content of this article for the three databases. Similarly, it should fit most other databases.

Depth understanding of running a single table, is to understand the basis for planning multi-table operation. Dream run over there planning the database, there will be more a part of the message. Therefore, this text works in my dream was selected to the database as an example database that runs in terms of planning ideas. After reading this article, should be able to read one of these three database tables to run planning.

Second, in-depth understanding of database operation planning
Planning a dream run up to the database occur in two ways: NO · 1 species in the appearance of the graphical method; the second appearance of the document-style approach. The second method used to stop there, and speaking. Understand the operation planning, understanding of database performance tuning towards a very important step.

From the operation plan, we did not run the score to see how to query the database and run the plan according to judge the operation of the query may be efficient, and how to stop the optimization. We will go through the following example to understand the database as part of Operation Planning.

1. There is no index filters out how to run a full table scan?
Structure, run the scenario:

Query is:
The statement of the running process, if the statement did not describe the results described by words like:

  • 1) If it is NO · 1 second to run the steps, then made the table of NO · 1 records; otherwise get the next record the current record. If the records have been scanned over, then run the step 4, otherwise run the step 2.

  • 2) determine whether the record may be filtered to meet the requirements c1 = 2, to meet the running step 3, otherwise run the step 1.

  • 3) put the record into the result set, run the step 1.

  • 4) the result set returned to the client. A total of five.

No comments:

Post a Comment