Importance of developing DBA

Source: Internet
Author: User

What is the importance of application dba? 1. it is very important to review the SQL statements written by developers and correct SQL statements with performance problems. compile complex business logic SQL statements. Because the SQL statements written by the developers of complex business logic basically have performance problems, it is better for the DBA to write the SQL statements by itself than for developers. --- Very important 3. participate in the DB Design and correct unreasonable DB Design as soon as possible. ORACLE's performance is designed, rather than being tuned. This is very important 4. perform basic maintenance on ORACLE. 5. working with the application architect and correcting mistakes made by the application architect, the development DBA also has the role of the application architect. 6. efficient design and planning of the entire database. This work cannot be handed over to the O & m dba because O & M does not understand the business. As you can't imagine, there is no DBA Company, and the system performance is poor. For example, I recently encountered an SQL statement that ran very slowly. The first 12-second output (read from the disk into the memory) and the second 2-second output (the data is in the buffer cache ), the SQL code is as follows: [html] SELECT COUNT (0) FROM P LEFT JOIN R ON P. ID = R. ID; P has 200 W data; R has 100 W data. This SQL statement runs for 12 seconds for the first time and is certainly unacceptable. So let's take a look at how to optimize this SQL statement? In fact, this SQL statement is written incorrectly. Here it is an external connection, and the COUNT (*) is calculated. The JOIN field is ID, and the ID is generally a primary key, then this SQL statement can be completely rewritten to [html] SELECT COUNT (0) FROM P; after rewriting, COUNT (*) directly reads the primary key of the P table, 0.1 seconds -- 1 second to get the result, of course, note that if the ID of the R table is not the primary key and the ID of the R table has a duplicate value, the COUNT (*) value will increase and the original SQL statement cannot be rewritten as this is indeed incorrect, however, we cannot blame development because others do not understand SQL as they are so professional. Therefore, developers must have DBAs. As you can imagine, if DBA is not developed, it would be much slower when the data volume in Table P and table R increases to tens of millions/hundreds of millions. This small example demonstrates the importance of DBA development. Many optimizations have been made recently. Basically, all SQL statements are controlled to return results within one second.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.