Concurrent preliminary understanding of Oracle Database

Source: Internet
Author: User

First from a Lezilai said: We often hear that the number of users of such a website 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, here are two nouns, one is the number of users to visit each day, and one is the number of users online. So the two data is the number of concurrent database. Oracle database of a relatively stable concurrent number is about 200, that is, a better server, concurrent number in 200, but also to normal operation, will not panic. This shows that the above two data is not a concurrent number.

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

Access to the number of users: a large web site, there must be a lot of people to visit every day, whenever someone entered the site, the number of visits will be added, which caused a large number of visits. Someone visit, enter this website, must be to query the database, unless it is a pure static site, a person access will connect a database, from the inside take out data, this time there is concurrency, The concurrency number is 1. If someone else is visiting at this point, note that this is the time to connect to the database, and then add up. But we have to understand the fact that to be able to access the database at the same time, is a very difficult thing, there must be a time of the order, but also not without, just a few, (for example, access to the database information is relatively large, the first person has not disconnected, and someone to visit, In general also under 10, this data most servers can receive, so the probability of excessive concurrency is very low.

Online users: Refers to the system at a certain point in time how many users are landing, login also for a moment of the matter, and visit the site almost, he landed does not mean what to do, may be in a daze, may also play games in Kegua Zi.
Concurrency refers to how many users are operating on the system and generating data interactions at the same time or in the same second. For example, a forum, when a user writes a post, no data interaction with the server, when the number of concurrent +0, at the moment of his submission, the number of concurrent +1, when the user opened the post, concurrent number +1, because he needs to read data from the server, browsing posts, concurrent number +0, because the data has been downloaded to the client.

For a database or middle tier, the above concurrency is translated to the number of active connections. A connection that exists cannot be called concurrency because it may be idle, and the data is counted concurrently through the connection operation.

For an Oracle database, a concurrency number refers to a session with an active state, and total user concurrency refers to the number of non background sessions in which the State is active, and you can find data from the gv$session.

So how to prevent concurrency. In the program we can control, such as spring, connection pool is a very good dongdong, connection pool There are many, you use, run out, you wait. Of course, the time will not be too long, basic feeling does not come out, but, access to the data is too large, you may create a slow the illusion of their speed, in fact, is not finished downloading it.

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.