On Wed, 21 Oct 2009, Unabashed wrote: > To: sqlite-users@sqlite.org > From: Unabashed <wombat...@gmail.com> > Subject: [sqlite] Slow SELECTs in application > > > Hello! > I'm using SQLite as DB in my application. My problem consists of two > aspects. First , it works great, but on large data SELECTs are very slow > (10-20s!). Queries are in one transaction. My table structure is: > CREATE TABLE mgWords ( > id INTEGER PRIMARY KEY AUTOINCREMENT, > id_norm INTEGER, > word TEXT, > wform TEXT)
You could try removing the AUTOINCREMENT constraint to speed things up a little. All you need is: id INTEGER PRIMARY KEY, That will allow you to reference the rowid using the 'id' identifyer. They both referer to the same thing. Please see: http://www.sqlite.org/autoinc.html for all the details. Kind Regards, Keith Roberts ----------------------------------------------------------------- Websites: http://www.php-debuggers.net http://www.karsites.net http://www.raised-from-the-dead.org.uk All email addresses are challenge-response protected with TMDA [http://tmda.net] ----------------------------------------------------------------- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users