Database images-database snapshots-database replication are familiar to database developers. What are their advantages and advantages? For example, a statistical statement may have a huge impact on a database with frequent operations. For example, if the database has million data records, you can sum up or perform fuzzy queries, then estimate thisProgramIt takes n seconds to complete the operation, which has a very large impact on other operations. If there is an identical image, it will not affect the primary database even if it takes N + n seconds, here we will briefly introduce the advantages and disadvantages of each operation.
①: Database image: Minimum requirement: Version 2005 or later, must be Patch SP1 or later
Introduction: the database image is similar to the common system ghost image. It is a backup, but the difference is that the image and the database are synchronized in real time, which can be seen as backing up every second.
Advantage: backup is the biggest advantage of the backup server. When the server crashes, you can immediately start the backup server to make it run normally. This is the biggest advantage of the backup server.
Disadvantage: Since backup is required, performance consumption is positive. However, compared with other types, this consumption is basically within the acceptable range, in addition, the image database cannot be accessed. You need to take a snapshot of the image database before accessing the database. If you can directly access the image database, it will be nice. Of course, this is just a fantasy.
②: Database snapshot:
Introduction: Database snapshots can be imagined as cameras, that is, taking database snapshots exactly the same. Make a backup
Advantage: it is similar to a person who grows up and has many photos. For example, if you take one image every year, it will be very convenient to view it later.
Disadvantage: Real-time backup cannot be performed, but only one backup can be performed at a certain time. Many requirements are not met. In addition, if the data size is very large, performance will also be consumed.
③: Database Replication: (this is not a restoration of database backup)
Introduction: there are also two databases, one master database and one slave database. There is a publishing and subscription relationship between the master and slave databases, that is, I have modified it to notify you, or you can always read me, it's that simple to see if I have modified it.
Advantage: it is a log file that is read and synchronized according to the log file, so it can basically meet the requirements for synchronization, And I tested it slightly by mistake, unless the server is blocked, otherwise, the performance is still very high, and millions of data can be synchronized in a few seconds, which shows the efficiency.
Disadvantage: the publisher and subscriber are not synchronized in real time, so there is a frequent delay. This is an indefinite factor and consumes> database images.
For the above mode, the combination of images and snapshots is a good choice. For specific usage of each typeArticleUpdated one by one.