Label:Traditional SQL PagingTraditional SQL paging, all the solutions are almost row_number, for the needs of a variety of sorting, complex query scenarios, Row_number is the killer. In addition, for the current web is very popular Poll/push load paging way, generally use time stamp to achieve paging. These two kinds of paging can be said that the former is universal, even LINQ generated by the paging is row_number, it is conceivable that it is more versatile. The latter is best both in terms of
Tags: containe data-public windows cal e431 Lin effect DebSystem Environment: centos7.2 zabbix-3.4first, the principleView the status of MongoDB with the following command: Echo "Db.serverstatus ()" | MONGO admin echo "Db.serverstatus (). Opcounters" | MONGO AdminSecond, the configuration process1. Add the MongoDB path to the system environment:Vim/etc/profile export Path=/usr/local/
:
Using Mongodb.bson;Using Mongodb.driver;
To perform data operations, first instantiate a mongoclient
var client = new Mongoclient ("mongodb://127.0.0.1:27017");
Then create DATABASE and collection
var database = client. Getdatabase ("foo");var collection = database. Getcollection
Then we can try to insert a piece of data, the code is as follows
var document = new Bsondocument{{"Name", "SQL Server
larger, or nscanned is much larger than nreturned, it means that the database scans many objects to find the target object, so you need to index the query criteria.
When the returned result set is large, i.e. the ResponseLength value is large, the performance is degraded, and a second query parameter is added to the Find query to get only the fields that need to be displayed.
4, explainExecution plan5, the maximum number of connections
Tags: BSP sel logs performance. So in the DES image configuration Server configuration:Cpu:1 Core Memory: 2048 MB (I/O optimized) network bandwidth: 1M CentOS 7.0 MongoDB 3.2MySQL 5.6 Server table Data volume 1,184,545 MongoDB data is imported by MySQL, ensure the data consistent experiment prepared to execute the statement as: MySQL:SELECT *From sharelooks_30
determine the speed of MongoDB query.Conclusion1. Li Yun's cloud host has made certain restrictions that result. Regardless of setting the system, the configuration of the database, all. Cannot break through. An order of magnitude of QPS.2. The number of client CPU cores determines the speed of MongoDB queries.3.tcp limit passed. Walk inside. Nets can be avoided.4.linux OS beats windows. So the
system very wellHow to use indexes to speed up retrieval while targeting optimized indexes.Optimizer profileThe MongoDB database Profiler is a slow query log feature that can be used as a basis for optimizing our databases.Turn on the profiling function, there are 2 ways to control the profiling switch box level.Add-profile= level when starting MonggodbThe Db.setprofilinglevel (level) command is called on the client to configure in real time.The prof
%read
100%read
Comparison of wiredtiger_syncperiodsecs_60 with 1
Sharding Cluster Performance Pressure measurement
Description
Scenario 1-4 1000W data per load, data size approx. 13G
Scenario 5 load 5000W data, data size approx. 75G
Test method
YCSB Pressure Measurement
Test Result Scenario 1: Single node _100%insert (load data) Scenario 2: Single node _50%update50%readScenario 3: Sing
method One: MongostatThis tool provides a quick view of statistics for a set of running MongoDB instances, using the following:[[email protected] bin]#./% idx Miss% QR|QW ar| AW conntime *0 *0 *0 *0 ... 0 0 0|0 1|0 4 01:19:15*0 *0 *0 *0 ... 0 0 0|0 1|0 4 01:19:16*0 *0 *0 *0 ... 0 0 0|0 1|0 4 01:19:17It refreshes the status value every second, providing good readability, which allows you to observe the performance
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.