MongoDB paging query method and Performance
I have been a little busy recently. There are a lot of things to summarize. In fact, there should be four, five, and six Redis series... however, Redis in Action has not been completed yet. I will summarize it later. Otherwise, it will be too watery. Sorry, readers.
Since the last time in Redis, it was a bit of an entry into Nosql products. This will change the di
handlersocket. Therefore, we can see that the number of QPS is significantly greater than the number of TPS, and batch insert operations significantly improve the overall performance.
MongoDB adopts the method of merging operations internally. Data is first stored in the memory and then flushed to the disk. Therefore, from the test data, we can see that the TPS curve slope is very high: Sometimes the T
ArticleDirectory
The first problem: the key-value database may have a lot of keys. That's right, but it's a big mistake for MongoDB.
The second question: Is findone ({_ ID: XXX}) Faster?
Third question: Use update in detail
In the previous article, we tried to find out the effect of true or false. Some of them are slogans. Now we start to practice them, and they are attributed to pragmatism. Scenario
Before we start, we should f
SpiderMonkey
Mongo js shell
After I have compiled the Mongodb v8 version, I will compare and test the four environments.
Compile mongodb + v8
In OpenSUSE11.4, it is easy to use the linux package management tool to prepare the compiling environment:
# Installed Package: g ++ subversion git python
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Sudo zypper
MongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for WEB applications.
MongoDB is a product between relational database and non relational database, and is the most powerful and relational database in the relational database.
First, index
Conclusion:
1, 200w data, reasonable use of the index case, a single stationid under 4w data. MongoDB Query and sorting performance ideal, no regular when the client can complete the query in 600ms+, qps300+. When there is a regular client can complete the query in 1300ms+, qps140+.
2, MongoDB count performance is re
MongoDB is a high-performance extensible document-based NoSQL database, and high performance also requires configuration in several key dimensions, including hardware, application patterns, pattern design, indexing, disk I/O, and so on.Storage EngineWiredtiger is the default storage engine after 3.0, fine-grained concurrency control and data compression provide h
of data is about 1 K.
Remember that the method of this test is to generate 100 million data in memory before performing the insert operation. Fortunately, the memory of the test machine is large enough to save so much data.
3. Insert data into the database in the following four modes, and when each 1000 data is inserted, the time of the moment is written to a fixed file:
A) specify _ID as the MD5 value of 1–100,000,000 in M
MongoDB is a high-performance data, but in the process of use, you will occasionally encounter some performance problems. MongoDB is relatively new compared to other relational databases, such as SQL Server, MySQL, and Oracle, and many people are not familiar with it, so many developers, DBAs tend to focus on the imple
MONGDB Performance pressure test, random query, data volume 100 million records
Operating system centos6.4x64 bit
From the test results, when MongoDB all the data into memory, query speed according to the size of the document, performance bottlenecks are usually in the network traffic and CPU processing performance (
Use of MongoDB stored procedures and performance tuning Solutions
Although MongoDB provides us with a lot of drivers, it is not convenient to use the mongodb shell. For example, the recently needed DBRef nested data must be CRUD. If the mog driver is used, it will be very troublesome. Therefore, we will conduct an expe
Query (table 300 million data):
Simultaneous connection number op/s3 8K5 10K8 16K20K25K32K40K48K57KThe memory even index cannot be completely lowered:
Cache:data = 1:10
Query (table 300 million data):
Simultaneous connection number op/s3 3.4K5 4.5K8 9.3K11K14K20K24K25K34K(Click to view larger image)The index is all in memory:Cache:data is 4:10The index is not all in memoryCache:data is 1:10
Memory is large enough, the CPU is the bottleneck, the better the CPU
first part of the basic chapter II install MongoDBPart I basic chapter III MONGODB architectureThe first part of the basic chapter fourth MongoDB Quick StartThe first part of the basic chapter Fourth MongoDB queryPart Two application chapter Fifth MongoDB advanced queryPart Two application chapter sixth
The topic is not very accurate, because the database does not provide paging , ranking and other functions, providing only data access, page ranking these are our database-based practical cases only. However, whether it is Redis or MongoDB, there are usually some common ways to do paging and ranking. This article introduces some test data to show you the performance difference between Redis and
default setting, there are two kinds of setting method and level, one is by adding –slowms boot parameter configuration. The second is to invoke Db.setprofilinglevel with the second argument:
Db.setprofilinglevel (level, slowms)
db.setprofilinglevel (1, 10);
2. Query Profiling Records
Unlike MySQL's slow query log, the MongoDB profile record is directly present in the system DB, and the record location is System.profile, so we'll just h
performance and business to set), so set a big meaningless. If you set a reasonable value, you reach this value and MongoDB the new connection request to avoid being dragged down by too many connections.2.indexcounters:btree:misses index of the number of misses, and the ratio of hits to consider whether the index is correctly established. You see my "missratio": 3.543930204420982e-7, very healthy bar. So t
are settings, there are two ways to set the method and level, one is to add the –slowms boot parameter configuration. The second is to add the second parameter when calling Db.setprofilinglevel: Db.setprofilinglevel (level, slowms)
db.setprofilinglevel (1, 10);2. Query Profiling RecordsUnlike MySQL's slow query log, MongoDB profile records are directly present in the system DB, recording location system.profile, so we can only query this collection r
First of all, I use the situation:
The first used memcache, a server-side cache of key-value pairs, used to store some commonly used data that is not very large, but that requires rapid response
Then, in another place, Redis is used, and then the next Redis is studied. A look, shows that they installed the PHP extension, because there is a server on the Redis service side, their own local is not installed, in fact, the usage and memcache basically the same, may be a few parameters are differen
Traditional SQL pagingIn traditional SQL paging, almost no row_number exists in all solutions. For scenarios that require various sorting and complex queries, row_number is a killer. In addition, the time stamp is usually used for paging loading by poll/push on the current web. These two types of pages can be said to be generic, and even the pages generated by Linq are row_number. The latter is the best both in terms of performance and complexity, bec
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.