A preliminary understanding of the concurrency of "Oracle" Oracle Database

Source: Internet
Author: User

First from a Lezilai said: "We often hear that the number of visitors to a site every day dozens of, thousands of, millions of or even tens of millions, while the number of online users have tens of thousands of, hundreds of thousands of."

From this column we analyze the concept of database concurrency.

First, there are two nouns, one is the number of users visited each day, and the other is the number of users online. So are these two data the number of concurrent databases? Oracle database of a relatively stable number of concurrency is about 200, that is, a better server, the number of concurrent in 200, can also run normally, does not crash. Thus, the above two data are not concurrent numbers.

Let's get to the meaning of these two nouns.

Number of Access users: a large site, every day is certainly a lot of people visit, every time someone enters this site, the number of visits will be added one, resulting in a large number of visits. Someone visit, enter this website, must be to query database, unless is pure static website, one person accesses will connect a database, take out the data from inside, this time has concurrency, The number of concurrent numbers is 1. If someone else is also visiting at this point, notice that at this point in time the database is connected, then the concurrency accumulates. But, we have to understand a fact, can do at the same time access to the database, is a very difficult thing, there must be a time sequence, but also not no, just a few, (for example, access to the database information is relatively large, the first person has not been disconnected, and someone to visit, caused by concurrency) is generally under 10, this data most servers can receive, so the probability of high concurrency is very low.

Number of online users: refers to the system at a certain point in time the number of users are landing, login also for a moment, and visit the site almost, he landed does not mean to do anything, may be in a daze, may also play games in Kegua Zi.

Concurrency refers to how many users are doing operations on the system and generating data interactions at the same time or in the same second. such as the forum, a user when writing a post, there is no data interaction with the server, then the number of concurrent +0, at the moment of his submission, concurrent number +1; When the user opens the post, the number of concurrent numbers is +1, because he needs to read the data from the server, while browsing the post, the number of concurrent +0, because the data has

For a database or middle tier, the above concurrency is interpreted as the number of active connections. An existing connection cannot be called concurrency because it may be idle, and manipulating the data through this connection counts the number of concurrent

For Oracle databases, a concurrency number refers to a session with a status of active, and the total number of concurrent users is the number of non-background sessions that are active, and you can find data from gv$session.

So how to prevent concurrency? In the program we can control, such as spring, the connection pool is a very good thing, the connection pool there are many, you use, run out, you will wait. Of course, the time will not be too long, the basic feeling does not come out, but, access to the data is too large, may give you a self-speed of the illusion of slow, in fact, is not yet downloaded!

Original link:A preliminary understanding of Oracle database concurrency

A preliminary understanding of the concurrency of "Oracle" Oracle Database

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.