開源數據庫,SQLite 3.8.8 發布
SQLite 3.8.8 發布,此版本是 SQLite 常規的維護版本,沒有引人注目的新特性或者性能改進,只是不斷的在改進。主要的性能提升是通過重構 B-Tree 重整邏輯來避免不必要的 memcpy() 操作。新特性包括 PRAGMA data_version 狀態,可以訪問一個 VALUES clause ,不限制任意行數。此外解決了一些 Mac 上的編譯錯誤和多線程問題。
SQLite Release 3.8.8 On 2015-01-16 (3.8.8)
- Added the PRAGMA data_version command that can be used to determine if a database file has been modified by another process.
- Added the SQLITE_CHECKPOINT_TRUNCATE option to the sqlite3_wal_checkpoint_v2() interface, with corresponding enhancements to PRAGMA wal_checkpoint.
- Added the sqlite3_stmt_scanstatus() interface, available only when compiled with SQLITE_ENABLE_STMT_SCANSTATUS.
- The sqlite3_table_column_metadata() is enhanced to work correctly on WITHOUT ROWID tables and to check for the existence of a a table if the column name parameter is NULL. The interface is now also included in the build by default, without requiring the SQLITE_ENABLE_COLUMN_METADATA compile-time option.
- Added the SQLITE_ENABLE_API_ARMOR compile-time option.
- Added the SQLITE_REVERSE_UNORDERED_SELECTS compile-time option.
- Added the SQLITE_SORTER_PMASZ compile-time option and SQLITE_CONFIG_PMASZ start-time option.
- Added the SQLITE_CONFIG_PCACHE_HDRSZ option to sqlite3_config() which makes it easier for applications to determine the appropriate amount of memory for use with SQLITE_CONFIG_PAGECACHE.
- The number of rows in a VALUES clause is no longer limited by SQLITE_LIMIT_COMPOUND_SELECT.
- Added the eval.c loadable extension that implements an eval() SQL function that will recursively evaluate SQL.
Performance Enhancements:
- Reduce the number of memcpy() operations involved in balancing a b-tree, for 3.2% overall performance boost.
- Improvements to cost estimates for the skip-scan optimization.
- The automatic indexing optimization is now capable of generating a partial index if that is appropriate.
Bug fixes:
- Ensure durability following a power loss with "PRAGMA journal_mode=TRUNCATE" by calling fsync() right after truncating the journal file.
- The query planner now recognizes that any column in the right-hand table of a LEFT JOIN can be NULL, even if that column has a NOT NULL constraint. Avoid trying to optimize out NULL tests in those cases. Fix for ticket 6f2222d550f5b0ee7ed.
- Make sure ORDER BY puts rows in ascending order even if the DISTINCT operator is implemented using a descending index. Fix for ticket c5ea805691bfc4204b1cb9e.
- Fix data races that might occur under stress when running with many threads in shared cache mode where some of the threads are opening and closing connections.
- Fix obscure crash bugs found by american fuzzy lop. Ticket a59ae93ee990a55.
- Work around a GCC optimizer bug (for gcc 4.2.1 on MacOS 10.7) that caused the R-Tree extension to compute incorrect results when compiled with -O3.
Other changes:
- Disable the use of the strchrnul() C-library routine unless it is specifically enabled using the -DHAVE_STRCHRNULL compile-time option.
- Improvements to the effectiveness and accuracy of the likelihood(), likely(), and unlikely() SQL hint functions.
- SQLITE_SOURCE_ID: "2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf"
- SHA1 for sqlite3.c: 91aea4cc722371d58aae3d22e94d2a4165276905
New Features:
SQLite是遵守ACID的 關聯式數據庫 管理系統,它包含在一個相對小的C庫中。它是 D.RichardHipp 建立的公有領域項目。
不像常見的 客戶-服務器 范例,SQLite引擎不是個程序與之通信的獨立進程,而是連接到程序中成為它的一個主要部分。所以主要的通信協議是在編程語言內的直接 API 調用。這在消耗總量、延遲時間和整體簡單性上有積極的作用。整個數據庫(定義、表、索引和數據本身)都在宿主主機上存儲在一個單一的文件中。它的簡單的設計是通過在開始一個事務的時候鎖定整個數據文件而完成的。
特征
庫實現了多數的SQL-92標準,包括 事務 ,就是代表 原子性 、 一致性 、 隔離性 和 持久性 的(ACID),觸發器和多數的復雜查詢。不進行 類型檢查 。你可以把字符串插入到整數列中。例如,某些用戶發現這是使數據庫更加有用的創新,特別是與無類型的腳本語言一起使用的時候。其他用戶認為這是主要的缺點。
多個 進程 或 線程 可以訪問同一個數據而沒有問題。可以并行的滿足多個讀訪問。只有在其他訪問當前不被服務的時候才能滿足寫訪問;否則寫訪問失敗并帶有一個錯誤代碼(也可以在可配置的超時過期之后自動的重試)。
提供了叫做sqlite的一個獨立程序用來查詢和管理SQLite數據庫文件。 它也充當寫使用SQLite庫的應用的一個例子。
語言綁定
可以從C/C++程序中使用這個庫,還可以獲得對Tcl和一些其他腳本語言的綁定。
在CPAN的 DBD::SQLite 上有一個Perl的 DBI/DBD 模塊,它不是到SQLite的接口,而是包括整個SQLite數據庫引擎在其中并不需要任何額外的軟件。
還有一個Python模塊叫做 PySQLite 。
PHP從PHP5.0開始包含了SQLite,但是自5.1版之后開始成為一個延伸函式庫。SQLite能與PHP4一起工作但不包含在其中。
Rails 2.0.3將缺省的數據庫配置改為了SQLite 3
SQLite管理客戶端
SQLite亦可以作為桌面數據庫使用,以下為第三方SQLite的 GUI 軟件。例如,
-
SQLiteMan,使用QT開發的一個SQLite客戶端,支持多語言、跨平臺。 SQLiteMan
-
SQLite Manager, 以 火狐瀏覽器的擴展 形式提供的SQLite客戶端。
-
SQLite Database Browser , a graphical client to access SQLite databases
-
SqlPro SQL Client , another graphical client to work with SQLite databases