On Wed, 21 Oct 2009 17:35:41 +0100 (BST), Keith Roberts
<ke...@karsites.net> wrote:

>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.

id will also alias to rowid with the AUTOINCREMENT clause.
There is no reason why it wouldn't. INTEGER PRIMARY KEY is
decisive by itself.

>Please see: http://www.sqlite.org/autoinc.html

, which explicitly states what AUTOINCREMENT does for ROWID.

>for all the details.
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to