On Mon, Nov 3, 2014 at 6:48 AM, Clemens Ladisch <clem...@ladisch.de> wrote:

> Paul wrote:
> > Are additional indices, created for WITHOUT ROWID, potentially less
> > efficient and more cumbersome?
>
> For tables with a rowid, the index stores the indexed columns and the
> rowid.  For WITHOUT ROWID tables, the index stores the indexed columns
> and the primary key.
>

And, lookup by rowid is (usually) faster than lookup by arbitrary primary
key.  So, yes, WITHOUT ROWIDs might be a little slower when using secondary
indexes.

But in a complex system, many factors come into play.  It is best to give
it a try.

Realize that any schema that works with WITHOUT ROWID on a table, will work
just as well with the WITHOUT ROWID omitted.  So you can test your
application both with and without the WITHOUT ROWID clause and see which
gives the better performance, without making any changes to your internal
queries.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to