SQLite 3.40 arrives with official support for Wasm and more


SQLite is a lightweight database engine

The release of the new version of the popular DBMS “SQLite 3.40”, a lightweight DBMS designed as a plugin library.

SQLite is a lightweight relational database engine accessible through the SQL language. Unlike traditional database servers, such as MySQL or PostgreSQL, its particularity is not to reproduce the usual client-server schema, but to integrate directly into programs. In fact, the entire database (statements, tables, indexes, and data) is stored in a platform-independent file.

Thanks to its extreme lightness, SQLite is one of the most used database engines in the world. It is used in many consumer programs and is also very popular in embedded systems, including most modern smartphones.

Main new features of SQLite 3.40

In this new version that is presented, it is highlighted that a experimental ability to compile SQLite into WebAssembly code Intermediate that can be run in a web browser and is suitable for organizing database work from web applications in the JavaScript language.

Web developers have a high-level object-oriented interface for working with data in the style of sql.js or Node.js, linking a low-level C API and an API based on the Web Worker mechanism that allows you to create asynchronous controllers that they run on separate threads. The data that web applications store in the WASM version of SQLite can be stored on the client side using OPFS (Origin-Private FileSystem) or the window.localStorage API.

Another change that stands out in this new version is the improved query planner performance, In addition, the restrictions when using indexes with tables of more than 63 columns were removed (previously indexing was not applied for operations with columns whose ordinal number exceeded 63).

SQLite 3.40 also introduces a improved indexing of values ​​used in expressions, Also stopped loading large strings and blobs from disk when processing the NOT NULL and IS NULL operators. Materialization excluded from views for which a full scan is performed only once.

Additional checks have been added to the implementation of the "PRAGMA Integrity_check" parameter. For example, tables without the STRICT attribute should not contain numeric values ​​in text columns and string values ​​with numbers in numeric columns.

In addition to this, it is also highlighted that recovery extension added, designed to recover data from damaged database files. The command line interface uses the ".recover" command to restore.

Of the other changes that stand out from this new version:

  • In the codebase, instead of the "char *" type, a separate sqlite3_filename type is used to represent file names.
  • Added internal function sqlite3_value_encoding().
  • Added SQLITE_DBCONFIG_DEFENSIVE mode to prevent changing storage schema version.
  • Also added to check the correctness of the order of the rows in the tables with the "WITHOUT ROWID" sign.
  • The expression "VACUUM INTO" takes the settings "PRAGMA synchronous" into account.
  • Added compiler option SQLITE_MAX_ALLOCATION_SIZE, which allows you to limit the size of blocks when allocating memory.
  • The algorithm for generating pseudorandom numbers built into SQLite has been ported from using the RC4 stream cipher to Chacha20.
  • It is allowed to use indexes with the same name in different data schemas.
  • Performance optimizations have been made to reduce CPU load by approximately 1% during typical activity.

Finally, if you are interested in knowing more about it You should know that the SQLite code is distributed in the public domain, that is, it can be used without restrictions and free of charge for any purpose.

Financial support for SQLite developers is provided by a specially created consortium, which includes companies such as Adobe, Oracle, Mozilla, Bentley, and Bloomberg.

You can check more details about this new release at the following link.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.