avatar
Articles
31
Tags
18
Categories
7

Home
Archives
Tags
Categories
List
  • Music
  • Movie
Link
About
Junhe(Ivy) Zou
Home
Archives
Tags
Categories
List
  • Music
  • Movie
Link
About

Junhe(Ivy) Zou

Data Recovery Methods
Created2023-07-20|MySQL
Data Recovery MethodsRecovering Deleted RowsIf you accidentally delete data rows using a DELETE statement, you can recover the data using the Flashback tool. The Flashback tool works by modifying the contents of the binlog, allowing you to replay the data back into the original database. To use this method, ensure that binlog_format is set to row and binlog_row_image is set to FULL. When recovering individual transactions, follow these steps: For INSERT statements (Write_rows event in the binl ...
Multithreading and Concurrency Concepts
Created2023-07-20|Java
Multithreading and Concurrency ConceptsCritical Section and Race Conditions Critical section: A code block where multiple threads access shared resources, potentially causing concurrency issues. Race condition: Occurs when multiple threads access a critical section with unpredictable execution sequences. Avoiding Race Conditions Blocking solutions: Use synchronized and locks. Non-blocking solutions: Utilize atomic variables. Synchronized Synchronized uses an object lock, allowing only one thr ...
Processes and Threads
Created2023-07-12|Java
Processes and ThreadsProcessesA process is responsible for loading instructions, managing memory, and handling I/O operations. Think of a process as an instance of a program; while programs are static, processes are dynamic. When a program is executed, it initiates a process. Processes are independent entities, and multiple processes can run concurrently on a system. They have their own memory spaces, resources, and execution environments. Processes have shared resources, such as memory sp ...
Master-Slave Switching Process
Created2023-07-10|MySQL
Master-Slave Switching ProcessMaster-Slave Switching Based on Log PositionWhen configuring node B as a slave of node A’, you need to execute a “change master” command with six parameters: MASTER_HOST, MASTER_PORT, MASTER_USER, and MASTER_PASSWORD represent the IP address, port, username, and password of master A’, respectively. MASTER_LOG_FILE and MASTER_LOG_POS indicate the position in the master’s log file from which synchronization should continue. This position is known as the synchronizat ...
MySQL Parallel Replication Strategies
Created2023-07-01|MySQL
MySQL Parallel Replication StrategiesMySQL Version 5.5 The official MySQL 5.5 version doesn’t support parallel replication. Table-based Distribution Strategy: If two transactions update different tables, they can be parallelized. Row-based Distribution Strategy: Transactions can be parallelized on the replica if they don’t update the same row. MySQL Version 5.6 Official MySQL 5.6 supports parallel replication but only at the database level. Its efficiency depends on the workload distribution a ...
MySQL Master-Slave Replication Principles
Created2023-06-01|MySQL
MySQL Master-Slave Replication Principles1. Setting the Slave Node as Read-Only Node B, even if not directly accessed, should be set to read-only (readonly) mode. Reasons: Some operational queries might be executed on the slave. Setting to readonly prevents mishaps. To prevent inconsistencies during the switch-over due to bugs or dual writes. Readonly status can be used to determine the role of the node. A long connection is maintained between Slave B and Master A. Replication Process: On ...
MySQL Logging Mechanism
Created2023-05-30|MySQL
MySQL Logging Mechanism1. Binlog Writing Mechanism During transaction execution, logs are first written into the binlog cache. Upon transaction commit, the contents of the binlog cache are written to the binlog file. Each thread has its own binlog cache, but all share a single binlog file. Parameters: binlog_cache_size: Controls the size of the binlog cache for each thread. Exceeding this size will temporarily store the data on the disk. sync_binlog: Controls the write and fsync timing. sync_ ...
Temporarily Enhancing MySQL Performance
Created2023-05-25|MySQL
In a normal short connection mode, once connected to the database, only a few SQL statements are executed before the connection is severed. The connection is re-established when needed. During peak times in a short connection model, there could be a sudden spike in connections. Temporarily Enhancing MySQL PerformanceIn a normal short connection mode, once connected to the database, only a few SQL statements are executed before the connection is severed. The connection is re-established when ne ...
Phantom Read
Created2023-05-21|MySQL
blog9.mdPhantom Read refers to a situation where a transaction, upon querying a range consecutively, sees rows in the second query that it did not see in the first. Phantom ReadPhantom Read refers to a situation where a transaction, upon querying a range consecutively, sees rows in the second query that it did not see in the first. When does Phantom Read occur? Under the Repeatable Read isolation level, normal queries are snapshot reads and will not see data inserted by other transactions. Ther ...
Principle of `order by` in MySQL
Created2023-05-20|MySQL
Principle of order by in MySQLSort Buffer Size (sort_buffer_size) sort_buffer_size determines the memory size that MySQL allocates for sorting (sort_buffer). If the data size to be sorted is less than sort_buffer_size, the sorting is completed in memory. If the data size for sorting is too large for memory, MySQL resorts to using disk temporary files to assist in sorting. External sorting typically uses the merge sort algorithm and may generate multiple temporary files. Max Length for Sort Dat ...
1234
avatar
Junhe(Ivy) Zou
Articles
31
Tags
18
Categories
7
Follow Me
Announcement
This is my Blog
Recent Post
Analysis of the Shows2023-11-13
What I want to change2023-10-16
Exploring Flexibility and Improv Mindset in Life2023-10-02
Yes And2023-09-07
Binary Search2023-09-03
Categories
  • Algorithm1
  • Dynamics NAV2
  • English1
  • Java5
  • MySQL14
  • NET1
  • NGINX1
Tags
MySQL2 Algorithm MySQL Server Architecture Web Development Improv Java MySQL1 Mindset Visual Studio NAV C# Resources improv MySQL English Flexibility Life Exploring
Archives
  • November 20231
  • October 20232
  • September 20232
  • August 20232
  • July 20238
  • June 20231
  • May 20239
  • April 20231
Info
Article :
31
UV :
PV :
Last Push :
©2020 - 2023 By Junhe(Ivy) Zou
Framework Hexo|Theme Butterfly