On 3 Feb 2011, at 10:43am, Mihai Militaru wrote:

> Nicolas Williams <nicolas.willi...@oracle.com> wrote:
> 
>>> Any idea why pg does ok on these queries without the extra index -
>>> Maybe they're created by default?  SQLIte doesn't create any indexes
>>> automatically on primary key fields or anything else, correct?
>> 
>> No, it doesn't.  Use EXPLAIN QUERY PLAN to see what SQLite3 is doing.
> 
> Hmm SqLite does create persistent indices on UNIQUE - and consequently
> PRIMARY - keys, doesn't it?

SQLite creates some indexes the programmer doesn't specifically ask for: on the 
rowid, on the primary key, and on any column declared as UNIQUE.  Of course, in 
a particular table all three of these might actually be the same column, so it 
might need just one.  But every table has at least one index.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to