Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

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.

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.

Database performance tuning: Understanding

I. Introduction
This text works is the third on the performance of database performance tuning. Works on a text () stresses that in-depth understanding of planning to run a single table, single table operation planning is to understand the basis for planning multi-table operation.

Connect two tables, there are three running methods: 
1) nested loop join; 
2) hash connection; 
3) merge connection. 


Two tables in connection select which of the three? This depends on the index, and the connection cost. Highlights of the third article in the (paper) say that the text works, nested loop join, Part IV stresses that the text works hash connection, the fifth chapter about the works that merge the text link. Will be planned later in the sixth chapter, and EXISTS IN subquery subquery.

View the Gallery NO · 1 chapter:
Dream up a database, oracle database, sql server database, the database run planning is not fundamentally different, so the application works up to a dream text article database as an example database to stop planning, this text works we select oracle 10g database as an example.

After reading this article, should be able to read these three databases nested loop join operation planning. Another point is the stated demand: As the oracle of the stream of code is not open, and I got it running plans description of the basis, the cost of cost and the 10,053 documents the results of an end to anti push, though, as the direction from the large sense, does not appear difficult, just do start a discussion.

Second, in-depth understanding of the nested loop operation planning
Oracle database to run programs appear daily in two ways:

  • 1) autotrace on command;

  • 2) explain plan for the command;
Example application set autotrace command:
We did not score that run the "set autotrace on explain;" statement, the following query, insert, update, delete statement, there will be planning to run until the run "set autotrace off;" statement. If it is set "set autotrace on;", in addition to planning a run outside, there will be a part of the amount of case information useful visit. This highlights the text works do not involve assessment of the cost of the planning inquiry. 6 pp.

Database performance tuning: Understanding

I. Introduction
This text works is the third on the performance of database performance tuning. Works on a text () stresses that in-depth understanding of planning to run a single table, single table operation planning is to understand the basis for planning multi-table operation.

Connect two tables, there are three running methods: 
1) nested loop join; 
2) hash connection; 
3) merge connection. 


Two tables in connection select which of the three? This depends on the index, and the connection cost. Highlights of the third article in the (paper) say that the text works, nested loop join, Part IV stresses that the text works hash connection, the fifth chapter about the works that merge the text link. Will be planned later in the sixth chapter, and EXISTS IN subquery subquery.

View the Gallery NO · 1 chapter:
Dream up a database, oracle database, sql server database, the database run planning is not fundamentally different, so the application works up to a dream text article database as an example database to stop planning, this text works we select oracle 10g database as an example.

After reading this article, should be able to read these three databases nested loop join operation planning. Another point is the stated demand: As the oracle of the stream of code is not open, and I got it running plans description of the basis, the cost of cost and the 10,053 documents the results of an end to anti push, though, as the direction from the large sense, does not appear difficult, just do start a discussion.

Second, in-depth understanding of the nested loop operation planning
Oracle database to run programs appear daily in two ways:

  • 1) autotrace on command;

  • 2) explain plan for the command;
Example application set autotrace command:
We did not score that run the "set autotrace on explain;" statement, the following query, insert, update, delete statement, there will be planning to run until the run "set autotrace off;" statement. If it is set "set autotrace on;", in addition to planning a run outside, there will be a part of the amount of case information useful visit. This highlights the text works do not involve assessment of the cost of the planning inquiry. 6 pp.

How to find the operating system in bad SQL

Find operating system in a bad sql old topic, we have to the actual situation according to their plan. Must not be dogmatic use of this part of the tips described below. Application of this part of the SQL database statement, the group will generate operating system table, of course, increases the load on the system. Views of most people in the system some time after startup, in the middle of the night time load in less time (for example: a month) to check. Difficult to determine the specific plan should be specific.


The following is a part of my collection to find bad sql tips:
- SQL database running times and more
- Read more hard disk SQL database
- Sorted by number of SQL database
- The number of planning too much, too little number of runs, tied variables to use to write sql tricks
- Observation of the cursor
- View the current user running the SQL database & usertitle

How to find the operating system in bad SQL

Find operating system in a bad sql old topic, we have to the actual situation according to their plan. Must not be dogmatic use of this part of the tips described below. Application of this part of the SQL database statement, the group will generate operating system table, of course, increases the load on the system. Views of most people in the system some time after startup, in the middle of the night time load in less time (for example: a month) to check. Difficult to determine the specific plan should be specific.


The following is a part of my collection to find bad sql tips:
- SQL database running times and more
- Read more hard disk SQL database
- Sorted by number of SQL database
- The number of planning too much, too little number of runs, tied variables to use to write sql tricks
- Observation of the cursor
- View the current user running the SQL database & usertitle

open-source database prices 60% lower than

according to the latest data show that a check, open-source database products industry, the average selling price lower than that of commercial copyright database 60%.
According to vnunet.com reported here, this copies the data from individual companies to explore check Forrester, senior strategist said the open-source database maker, such as EnterpriseDB, Ingres and MySQL's database software, entirely free from licensing fees, at the same time control should be less than the cost of props commercial database industry products, such as Microsoft, Oracle and IBM.
In general, open-source databases are often entrenched in low-end exploration, that is, those capacity of not more than 200G of the small database. "In the field of import and export trade database, 8% of the users can only play 30% of the software industry, the function of goods." Family planning process in an interview that "the most simple functions, not completely open-source database products industry performance there, so the purchase and application of all aspects of complex commercial database industry products, there is also a waste of time. "
Of course, the open-source database is not as omnipotent, the first of which lack a number of popular features such as security, XML support. The function of this part is a commercial database just advocated. On the other hand, the practical application of the enterprise market stylish procedures, such as Oracle and SAP's software industry goods, not compatible with open-source database, but the plan had predicted, "Within a few years, the practical application of business process will land an open database platform." In fact, the operation of open-source database business, not to their grade in the low-end industrial goods exploration, Ingres CTO Dave individual companies at the beginning of the interview was that the future will open up commercial databases do not have the function to competition stand out. Of course, planning family show that the current database software, the user first planned, industrial commodity prices are still difficulties, this is the biggest advantage of open source products industry.

open-source database prices 60% lower than

according to the latest data show that a check, open-source database products industry, the average selling price lower than that of commercial copyright database 60%.
According to vnunet.com reported here, this copies the data from individual companies to explore check Forrester, senior strategist said the open-source database maker, such as EnterpriseDB, Ingres and MySQL's database software, entirely free from licensing fees, at the same time control should be less than the cost of props commercial database industry products, such as Microsoft, Oracle and IBM.
In general, open-source databases are often entrenched in low-end exploration, that is, those capacity of not more than 200G of the small database. "In the field of import and export trade database, 8% of the users can only play 30% of the software industry, the function of goods." Family planning process in an interview that "the most simple functions, not completely open-source database products industry performance there, so the purchase and application of all aspects of complex commercial database industry products, there is also a waste of time. "
Of course, the open-source database is not as omnipotent, the first of which lack a number of popular features such as security, XML support. The function of this part is a commercial database just advocated. On the other hand, the practical application of the enterprise market stylish procedures, such as Oracle and SAP's software industry goods, not compatible with open-source database, but the plan had predicted, "Within a few years, the practical application of business process will land an open database platform." In fact, the operation of open-source database business, not to their grade in the low-end industrial goods exploration, Ingres CTO Dave individual companies at the beginning of the interview was that the future will open up commercial databases do not have the function to competition stand out. Of course, planning family show that the current database software, the user first planned, industrial commodity prices are still difficulties, this is the biggest advantage of open source products industry.

Firebird is more difficult than the MySQL database

Text works planning and Firebird and MySQL database on the different methods of operation, this part of the cause not the same as Oracle's business as hard as the acquisition of individual companies the same as InnoDB and SleepyCat acquisition Firebird. Text works with the main difference is:
Are you afraid of SomeCo buying Firebird?
Text works with planning and operational methods of Firebird's not the same, this part of the same result as the Oracle is not as difficult as the business person company acquired the same InnoDB and SleepyCat acquisition Firebird. Text works with the main difference is:

a, MySQL database and other personal copyright is owned by the company processes personal company, so when the object on a single acquisition, but Firebird's rights depends on each program's contributors, the acquisition would have are from the hands of the copyright holder to buy a lot of , trouble is.

b, another difference is that Firebird uses a single licensing model, while the MySQL database is GPL / commercial dual-licensing model, which individual companies took the trouble even bought a part of the stream of code, more people still do not results in the original Chinese Internet Development Network code on the basis of progress towards independence. c, then is the difference between an overall higher Firebird, and MySQL database is more modular, if only one can replace the InnoDB engine.

d, another point that is Firebird authorization rules require so the changes are necessary to re-contribute to the community, and PostgreSQL database, MySQL database, the rules can not request it, you do not score from a code to stop the increase of the source is not published.