Noticed that if I have table with a unique index on all fields, counting all rows is still a lot faster (about a factor 10 on my particular test table) than counting distinct rows. Could maybe an optimization be added to SQLite to speed this up, taking advantage of the fact that there is a unique index on all fields? I am running SQLite 3.8.10.
RBS