[sqlite] Adding R-Tree index module to existing project

2012-04-01 Thread A Gilmore
I have a project that compiles SQLite with the following options: -DSQLITE_SECURE_DELETE=1 -DSQLITE_THREADSAFE=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_DEFAULT_PAGE_SIZE=32768 -DSQLITE_MAX_DEFAULT_PAGE_SIZE=32768

[sqlite] R-Tree index not used when query has an ORDER BY clause

2012-03-19 Thread A Gilmore
Hello, My query wont use the R-Tree index if I provide an ORDER BY clause and performance degrades considerably. Obviously I can work around with by making the R-Tree query a subquery and sorting the results, but would like to know why this is necessary? I've done an VACUUM and ANALYZE.

Re: [sqlite] Create table if not exists and insert seed data

2011-03-22 Thread A Gilmore
On 11-03-22 10:40 AM, Simon Slavin wrote: > > Or just do a 'SELECT id FROM whatever LIMIT 1'. If you get any error, it > doesn't exist, so create it and fill it. > > Or look in sqlite_master for an entry for the TABLE. > > Simon. Could also use INSERT OR IGNORE statements for the seed data if