On Thu, 8 Jan 2015 15:04:28 +0500, ?????? ??????? <mgume...@gmail.com> wrote:
> CREATE TABLE global ( > [key] VARCHAR (1024), > value BLOB, > level INTEGER NOT NULL, > original_name VARCHAR (1024), > id INTEGER PRIMARY KEY AUTOINCREMENT, > parent_id REFERENCES global (id) > ); The order of columns looks suboptimal. It's better to put smaller columns first, so all PK and key info is in the first page, and is not pushed to an overflow page when the values of text or blob columns have a biggish length(). Other remarks: * VARCHAR() translates to TEXT in SQLite. * parent_id missed a type definition. Typically, your table would look like: CREATE TABLE global ( id INTEGER PRIMARY KEY AUTOINCREMENT, parent_id INTEGER REFERENCES global (id), level INTEGER NOT NULL, [key] TEXT, original_name TEXT, value BLOB ); Other things to consider: PRAGMA page_size=something_larger_than_default; PRAGMA cache_size= .. ; -- Regards, Kees Nuyt _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users