SQLite learning 1
Huahuahu? 2021-07-20 04:24:38



It's like a compiler , The structure is divided into front end 、 virtual machine 、 Back end

Performance and limitations (limitations)

Use B Trees do it indexes, use B+ Trees do it table. Like other databases
Since authentication is not required 、 Network access , So for select,insert,update The operation is faster than other databases .

If the database is too large 、 If the query statement is too complex ,SQLite Performance is not as good as other databases .Oracle or PostgreSQL And worked out a lot of possible query plan, And then choose the best .SQLite No such function .

Generally speaking , Two dimensions limit SQLite Application .

  1. Concurrent . Generally speaking ,SQLite The lock in lasts a few milliseconds . If the database has many connections , And it's time sensitive , It's better not to use it .
  2. The Internet . SQLite It can be shared through the network file system , But a lot of NFS There are a lot of bug, This causes the file lock not to work properly , And then make the data inconsistent and so on .

There are some functions SQlite It hasn't been implemented yet .
- The complete trigger (trigger) Support . such as for each statment
- complete alter table Support . Only support RENAME TABLE and ADD COLUMN. Other ALERT TABLE operation , Such as DROP COLUMN,ALTER COLUMN,ADD CONSTRAINT I won't support it
- Can be updated views. SQLite in View Is read-only .
- Windowing function .SQLite compatible ANSI SQL 92, Are not compatible ANSI SQL 99. I won't support it RANK(),ROW_NUMBER wait

Please bring the original link to reprint ,thank
Similar articles