On 8 Dec 2017, at 12:20pm, x <tam118...@hotmail.com> wrote:

> I have a table with 2.4 million records. It’s a without rowid table (I don’t 
> know if that’s significant) with an integer primary key (ID) and several 
> secondary indexes of the form (OtherCol, ID). If I run
> 
> select min(ID), max(ID), count(*) from BigTbl;
> 
> It takes [far longer than the individual SELECTs take in total)

Are you doing this in your own programming language ?

If so, can you try obtaining timings using the SQLite command-line tool ?  If 
you want to post them please tell us which version of SQLite you’re using.

You might find the output of

EXPLAIN QUERY PLAN select min(ID), max(ID), count(*) from BigTbl;

helps you (and us, if you want to post it) to understand what’s happening.

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

Reply via email to