Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread Darko Volaric
0 I roll my own. > On Mar 16, 2018, at 4:37 PM, Richard Hipp wrote: > > This is a survey, the results of which will help us to make SQLite faster. > > How many tables in your schema(s) use AUTOINCREMENT? > > I just need a single integer, the count of uses of the

Re: [sqlite] [EXTERNAL] R*Trees query data cached?

2018-03-20 Thread David Ashman - Zone 7 Engineering, LLC
Thank you for the quick reply Hick.  I've implemented your script file in C since I'm running this application in the embedded world with no OS.  I don't see a .describe in the SQLite documentation.  I've tried to use .schema but that returns an error.  Do you have another suggestion to obtain

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread petern
Regarding SQLite "next_val()", the following works with or without "NOT NULL": CREATE TABLE t(rowid INTEGER PRIMARY KEY NOT NULL); INSERT INTO t VALUES (NULL),(NULL); SELECT * FROM t; --rowid --1 --2 DELETE FROM t WHERE rowid=1; INSERT INTO t VALUES (NULL); SELECT * FROM t; --rowid --2 --3 But

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread Chris Locke
> some people seem to think that an int primary key can be auto incrementing, it can't But it works in the same way sort of. Its auto incrementing, with the caveat that if the last row is deleted, the previous number will be used again. Depending on the database schema, this may or may

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread David Raymond
select name from sqlite_master where type = 'table' and exists ( select 1 from pragma_table_info(sqlite_master.name) where pk > 0 ) and not exists ( select 1 from pragma_index_list(sqlite_master.name) where origin = 'pk' ) order by name; Tables which have a primary key, but no index

Re: [sqlite] [EXTERNAL] R*Trees query data cached?

2018-03-20 Thread Hick Gunter
SQLite does not have "query caching". It does have a "page cache" that will keep heavily used pages iin memory. There is also the possibility of a file-system/os-level cache. To break down the 1.6 seconds required for the first query, try executing an sql script. In linux this would be along

[sqlite] R*Trees query data cached?

2018-03-20 Thread David Ashman - Zone 7 Engineering, LLC
Hello - I have a question on SQLite query data buffering. I'm successfully using SQLite v3.22.0 on an embedded ARM processor from ST with SD card.  The database file size is about 750MB.  The file system is Segger emFile FAT32.  I've configured SQLite to use 6MB RAM for heap.  I've done some

[sqlite] SQLITE_CANTOPEN_ISDIR and other extended error codes

2018-03-20 Thread Deon Brewis
How do you actually get a SQLITE_CANTOPEN_ISDIR error? In order to get an extended result code, we need to pass a sqlite3* connection, but you don't have that if the file can't be opened in the first place. Like... if it was a directory. I see how this is implemented internally - it generally

Re: [sqlite] SQLITE3 FTS5 prefix query get mismatch result

2018-03-20 Thread Dan Kennedy
On 03/20/2018 02:31 PM, zheng xiaojin wrote: (I am not sure whether you have seen my message, so resend again) Hi, When I use FTS5, I have met that, there are some cases which will get mis-match results with prefix search. Like "select * from tbl_fts where tbl_fts match 'lucy*';",which I want

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread Paul Sanderson
I read that - but my point was more that some people seem to think that an int primary key can be auto incrementing, it can't. SQLite version 3.18.0 2017-03-28 18:48:43 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread R Smith
On 2018/03/20 10:24 AM, Paul Sanderson wrote: Autoincrement can ONLY be used with an integer primary key I think Peter's shouting is more about the inability to distinguish via SQL or Pragma between an INTEGER PRIMARY KEY and an INT PRIMARY KEY, both of which are of course integer and can

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread Paul Sanderson
Autoincrement can ONLY be used with an integer primary key https://sqlite.org/autoinc.html On Tue, 20 Mar 2018 at 06:50, Peter Halasz wrote: > When needed I use a declared INTEGER PRIMARY KEY. > > > > > MAYBE THAT WOULD HAVE BEEN IN THE SURVEY TOO BUT I GUESS THERE

[sqlite] SQLITE3 FTS5 prefix query get mismatch result

2018-03-20 Thread zheng xiaojin
(I am not sure whether you have seen my message, so resend again) Hi, When I use FTS5, I have met that, there are some cases which will get mis-match results with prefix search. Like "select * from tbl_fts where tbl_fts match 'lucy*';",which I want to get records like "lucya","lucyabc" etc, and

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-20 Thread Peter Halasz
When needed I use a declared INTEGER PRIMARY KEY. > > MAYBE THAT WOULD HAVE BEEN IN THE SURVEY TOO BUT I GUESS THERE WAS NO WAY TO INCLUDE A SMALL PIECE OF SQL TO RELIABLY CHECK FOR INTEGER PRIMARY KEY YES I AM SHOUTING ___ sqlite-users mailing list