sqlite transaction model, performance optimization tips, common misconceptions

0 Introduction

This paper describes the sqlite transaction model, based on some performance optimizations Tips transaction model, transaction including packaging, WAL + separate read and write, sub-library sub-table, page size optimization. Based on the status and use hand wash sqlite summarizes some common problems and errors, mainly in multi-threaded setting, errors and other performance-optimized multi-threading. This paper first proposes the following questions (problem of carrying out the process has been confusing relationship storage framework unified storage optimization, but also the client developers often wrong questions) and answers in the text:

  • 1, multi-process safe sqlite is how to achieve? How performance?
  • 2. What sqlite database connection is?
  • 3, the words sqlite will lift the separate read and write, what specifically refer to? Can you improve the performance of data read and write? why
  • 4, WAL characteristics sqlite provided to solve the problem?
  • 5, multi-threaded setting sqlite is to solve the problem? What is the relationship with the separate read and write?
  • 6, under what circumstances a database deadlock will happen?
  • 7. What are performance-optimized solutions?

Guess you like

Origin yq.aliyun.com/articles/719143