In association with heise online

22 May 2013, 10:58

SQLite gets memory-mapped I/O

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

SQLite logo

SQLite, the ubiquitous, lightweight, C-based SQL engine, which is embedded in many applications, has been updated to SQLite version 3.7.17 with support for memory-mapped I/O which could potentially double performance and use less RAM. The new functionality adds xFetch() and xUnfetch() methods which are automatically called if memory-mapped I/O is activated, to map the data into memory. The developers point out that there are disadvantages to the technique that require coders using the functions be more robust in how they handle pointers and errors and that it is possible to not see performance boosted in certain test cases. Therefore, by default, memory-mapped I/O is turned off. Programmers wishing to exploit the functionality should consult the documentation.

Other enhancements include the addition of a string globbing function, reports of rollback recovery and risky uses of unlinked database files or aliases in the error log, and a new test harness for checking how multiple processes handle accessing one database at the same time. SQLite 3.7.17 also has improvements to the query planner when it handles joins.

There is also support for storing an Application ID in the database header so applications can determine if the database is for them. It also allows the file command to identify what application a database belongs to by consulting an extended magic.txt file.

Other changes are covered in the release announcement, including a number of bug fixes such as one for a potential database corruption bug. The new version is recommended for all users of SQLite and can be downloaded as source or as binaries for Linux, Mac OS X, Windows, Windows Phone 8 and Windows RT. SQLite development is sponsored in part by Adobe, Bloomberg, Mozilla, Bentley, Oracle and Nokia and all its code is dedicated to the public domain.



  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit