How to design a daily traffic tens other systems for Oracle Advanced Design and Development (1)

Source: Internet
Author: User

If you want to develop a daily traffic millions, or even tens of millions of levels of access to the Internet platform, performance and security is the first factor to consider. Single from the performance, mainly from the following aspects of consideration:

1) hardware and network equipment;

2) distributed, clustered, read-write separation, CDN acceleration, etc.;

3) use the good development framework to make full use of the caching mechanism;

4) Good database design planning, including database cluster, relational database + non-relational database combination;

5) High-performance development language programming, especially for database parts;

Wait a minute.

The construction of a medium and large-scale Internet platform, is a technical gold, put aside the hardware, network environment does not say, the system's performance depends largely on whether the system is reasonable, the design of the system is good, the design and development of the database side is the key.

I have been engaged in the development of the Internet platform, but also often participate in the company's technical personnel interview work against the database ( Oracle Part I usually ask each other two questions:

1)         char (Ten) varchar2 (Ten) nvarchar2 (Ten)

2) please say more than 10 practices that have an impact on performance optimization.

The outcome of the interview is often disappointing, really can answer the two more good few, this is mainly because even if there is a lot of work experience of developers, the opportunity to have access to a larger Internet platform is not much, more is to do some enterprise management system, dozens of, hundreds of users of the platform, Now the server performance can fully compensate for the shortcomings of the design performance defects.

in order to be able to learn from the experts, for Oracle design and development area, I will be 10 years of Internet project construction experience and everyone to share, inappropriate, please point out, we exchange learning with each other.

Before you begin, briefly answer the two questions above.

question 1 char (Ten) and the difference?

Char 9 letters, are all stored bytes, insufficient portions are supplemented with spaces;

wrong view: varchar2 types can be completely substituted Char , it can effectively save the data storage space.

correction: Although from the perspective of storage space,varchar2really thanCharreasonable, but the system in the processing of variable-length type, the need for additional resource overhead, of course, this overhead is very small, can be ignored, but when the data is large and need to process more data, the accumulated overhead can not be ignored. Therefore, when the business is clear about the length of the field, it should be explicitly defined asChartype, such as postal codechar (6), Genderchar (1) [Fshow a woman,Mrepresents a male].

NvarcharThe type is generated for different sets of bytes stored in different characters. If you want to store up toTenChinese, then it should be defined as aNvarchar2 (Ten), but notvarchar2 (), because inUNICODENext Chinese by2bytes, but encoded as aUTF-8, it is possible that3bytes, resulting in avarchar2 ()cannot be storedTena Chinese. When you need to store Chinese content, it is recommended to definencharornvarchar2type.

problem 2 please say more than 10 practices that have an impact on performance optimization.

A ) to effectively define the index

B data table space separation for table space and index table corresponding to normal table data

C a table with large data size is designed to do partition table

D ) A table with large data volumes, broken down into current tables and historical data tables based on business realities

E large tables of fields are split into multiple tables based on business realities

F) Reasonable field design, such as the ability tochar (2)Should not be defined aschar (4), can Number(6explicitly defined should not be defined as Numberor Number(Ten),to remember +the table of the million records, one more byte is more10M

G ) Reasonable Use Oracle buffers, such as loading frequently accessed base table data into memory

H minimize the granularity of the transaction

I ) Rational use of materialized views

J you can consider the compression properties of the table if necessary

Cond...


This article is from the "unity of Knowledge" blog, please be sure to keep this source http://connieguo.blog.51cto.com/9959230/1617573

How to design a daily traffic tens other systems for Oracle Advanced Design and Development (1)

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.