[sqlite] Feature Request - RowCount

2014-12-13 Thread RSmith
To the SQLite devs: After recent discussion about the row-count issue w.r.t. Nulls in primary keys etc. I have been somewhat wrestling with how to improve this from a user perspective. To explain: Most DB Admin tools out there displays the number of rows in a table when you select it or open

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread Richard Hipp
The SELECT count(*) FROM table query already has a special optimization in the b-tree layer to make it go faster. You can see this by comparing the times of these queries: SELECT count(*) FROM table; SELECT count(*) FROM table WHERE 1; The WHERE clause on the second query disables the

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread Simon Slavin
On 13 Dec 2014, at 12:38pm, Richard Hipp d...@sqlite.org wrote: Also, if there are indices available, SQLite attempts to count the smallest index (it has to guess at which is the smallest by looking at the number and declared datatypes of the columns) and counting the smallest index instead,

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread Jim Callahan
So, if I understand the discussion the fastest way to get a count from the command line interface (CLI) is to count the rows in the primary key, assuming you have a primary key and that it is not a composite key. SELECT COUNT(primarykey) FROM table1 The primarykey in the above example is a stand

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread Richard Hipp
No. The fastest is to do count(*). -- D. Richard Hipp Sent from phone - Excuse brevity On Dec 13, 2014 11:13 AM, Jim Callahan jim.callahan.orla...@gmail.com wrote: So, if I understand the discussion the fastest way to get a count from the command line interface (CLI) is to count the rows in

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread James K. Lowden
On Sat, 13 Dec 2014 14:15:15 +0200 RSmith rsm...@rsweb.co.za wrote: Most DB Admin tools out there displays the number of rows in a table when you select it or open it, so too the one I am working on and after testing stuff on Simon's question about the row counting, I realised that selecting

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread Simon Slavin
On 13 Dec 2014, at 7:46pm, James K. Lowden jklow...@schemamania.org wrote: Every DB Admin tool I've ever used proved to be more hinderance than help. They seem to be written by the moderately competent to help the novice, and run out of gas or fall over when faced with anything complex.

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread David Empson
On 14/12/2014, at 4:17 am, Simon Slavin slav...@bigfraud.org wrote: On 13 Dec 2014, at 12:38pm, Richard Hipp d...@sqlite.org wrote: Also, if there are indices available, SQLite attempts to count the smallest index (it has to guess at which is the smallest by looking at the number and

[sqlite] Encrypted database

2014-12-13 Thread Mujtaba Ali Panjwani
I have created an encrypted database using visual studio plugin of system.data.sqlite. Now whichever other database management software than VS, I try to open that database is failing. Can any of you please help me with issue. I suspect this is some sort of encryption algorithm support problem but

Re: [sqlite] Encrypted database

2014-12-13 Thread Igor Tandetnik
On 12/13/2014 2:29 PM, Mujtaba Ali Panjwani wrote: I have created an encrypted database using visual studio plugin of system.data.sqlite. Now whichever other database management software than VS, I try to open that database is failing. Isn't that the whole point? You've encrypted the database

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread RSmith
On 2014/12/13 14:38, Richard Hipp wrote: The SELECT count(*) FROM table query already has a special optimization in the b-tree layer to make it go faster. You can see this by comparing the times of these queries: SELECT count(*) FROM table; SELECT count(*) FROM table WHERE 1; The

Re: [sqlite] Encrypted database

2014-12-13 Thread Kevin Benson
On Sat, Dec 13, 2014 at 9:08 PM, Igor Tandetnik i...@tandetnik.org wrote: On 12/13/2014 2:29 PM, Mujtaba Ali Panjwani wrote: I have created an encrypted database using visual studio plugin of system.data.sqlite. Now whichever other database management software than VS, I try to open that