Re: [sqlite] Encrypted database

2014-12-13 Thread Kevin Benson
On Sat, Dec 13, 2014 at 9:08 PM, Igor Tandetnik 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

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;

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

[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] Feature Request - RowCount

2014-12-13 Thread David Empson
> On 14/12/2014, at 4:17 am, Simon Slavin wrote: > > > On 13 Dec 2014, at 12:38pm, Richard Hipp 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

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread Simon Slavin
On 13 Dec 2014, at 7:46pm, James K. Lowden 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 >

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread James K. Lowden
On Sat, 13 Dec 2014 14:15:15 +0200 RSmith 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

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" wrote: > So, if I understand the discussion the fastest way to get a count from the > command line interface (CLI) is to count the

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

Re: [sqlite] Feature Request - RowCount

2014-12-13 Thread Simon Slavin
On 13 Dec 2014, at 12:38pm, Richard Hipp 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 >

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

[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