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

2018-03-22 Thread Eduardo Morras
On Fri, 16 Mar 2018 11:37:24 -0400 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? Within all my projects 4 (very old projects) I don't use it on current projects. > I

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

2018-03-22 Thread jungle Boogie
On 16 March 2018 at 08:37, 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? > 0 ___ sqlite-users mailing list

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

2018-03-22 Thread Chris Locke
I see - thanks Paul. I misunderstood. Thanks for your detailed explanation. Chris On Wed, Mar 21, 2018 at 9:13 AM, Paul Sanderson < sandersonforens...@gmail.com> wrote: > Actually it is totally different Chris > > > I read that - but my point was more that some people seem to think that >

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

2018-03-22 Thread Dominique Devienne
On Thu, Mar 22, 2018 at 3:22 PM, Richard Hipp wrote: > On 3/22/18, Dominique Devienne wrote: > > > > Hi Richard. Is 8.d from https://www.sqlite.org/draft/ > releaselog/current.html > > the result of this inquiry? > > No. I just happened to notice the

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

2018-03-22 Thread Richard Hipp
On 3/22/18, Dominique Devienne wrote: > > Hi Richard. Is 8.d from https://www.sqlite.org/draft/releaselog/current.html > the result of this inquiry? No. I just happened to notice the inefficiency while I was working on 8d. > And is there a chance the "some kind of indexed

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

2018-03-22 Thread Dominique Devienne
On Sat, Mar 17, 2018 at 1:28 AM, Richard Hipp wrote: > On 3/16/18, R Smith wrote: > > It's interesting to fathom what hypothesis is being tested with this > pole... > > INSERT operations on a table with AUTOINCREMENT do a full-table scan > against the

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

2018-03-21 Thread Toby Dickenson
0 in all schemas On 21 March 2018 at 09:22, R Smith wrote: > > On 2018/03/21 11:13 AM, Paul Sanderson wrote: >> >> Actually it is totally different Chris > > > Indeed, and thank you for highlighting this. > > I'm so used to putting down CREATE TABLE t (id INTEGER PRIMARY KEY,

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

2018-03-21 Thread R Smith
On 2018/03/21 11:13 AM, Paul Sanderson wrote: Actually it is totally different Chris Indeed, and thank you for highlighting this. I'm so used to putting down CREATE TABLE t (id INTEGER PRIMARY KEY, f2, f3,... ) and seeing the id increment automatically when needed, I lost sight of the fact

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

2018-03-21 Thread Paul Sanderson
Actually it is totally different Chris > 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. an INT primary key cannot be autoincrementing An INTEGER primary key and an INTEGER primary key autoincrement work in

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] 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
igin = 'pk' ...> ) ...> order by name; name -- ipk sqlite> -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Peter Halasz Sent: Tuesday, March 20, 2018 2:50 AM To: SQLite mailing list Subject: Re: [sqlite] H

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

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

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

2018-03-19 Thread Jim Dodgen
0 On Friday, March 16, 2018, 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 AUTOINCREMENT > in your overall

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

2018-03-19 Thread Dominique Devienne
On Fri, 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 AUTOINCREMENT > in your overall

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

2018-03-19 Thread Wout Mertens
1 very important one. I use it to insert events into a queue with a version and the version has to monotonously increase. However, if I had to maintain the known max manually, that wouldn't really be a problem. On Mon, Mar 19, 2018, 3:52 AM Rowan Worth, wrote: > 5/10 > 1/11 >

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

2018-03-18 Thread Rowan Worth
5/10 1/11 5/10 Always in conjunction with INTEGER PRIMARY KEY fwiw. Also the following command is perhaps more portable: sqlite3 yourfile.db .schema | grep -ic autoincrement The sqlite3 shell on my system is too old to understand .schema --indent and doesn't output anything so there's

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

2018-03-18 Thread John G
0 (Out of 3 databases. ) On 16 March 2018 at 15:37, 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] How many AUTOINCREMENT tables are in your schema?

2018-03-18 Thread Cecil Westerhof
2018-03-16 16:37 GMT+01:00 Richard Hipp : > 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 AUTOINCREMENT > in your overall schema. You

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

2018-03-17 Thread Luuk
0 C:\Users\Luuk\AppData\Roaming\Thunderbird\Profiles\.default>sqlite3 global-messages-db.sqlite ".schema --indent" | findstr /i "autoincrement" C:\Users\Luuk\AppData\Roaming\Thunderbird\Profiles\.default> On 16-3-2018 16:37, Richard Hipp wrote: > '.schema --indent'

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

2018-03-17 Thread Stephen Chrzanowski
Every table I create that is considered a primary resource, I use auto-increment on exactly one field. Any table I create that uses auto-increment is used for internal use within the database, or, an "object" to point an item in a tStringList to the database row. This integer is NEVER given

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

2018-03-17 Thread Rob Willett
urday, March 17, 2018 9:04:22 AM To: SQLite mailing list Subject: Re: [sqlite] How many AUTOINCREMENT tables are in your schema? How many tables in your schema(s) use AUTOINCREMENT? Maybe a dozen uses in DB designs I made for my own use. Zero or very few in designs made for others.

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

2018-03-17 Thread x
0 in my first sqlite3 DB From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of Jean-Christophe Deschamps <j...@antichoc.net> Sent: Saturday, March 17, 2018 9:04:22 AM To: SQLite mailing list Subject: Re: [sqlite] How many A

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

2018-03-17 Thread Jean-Christophe Deschamps
How many tables in your schema(s) use AUTOINCREMENT? Maybe a dozen uses in DB designs I made for my own use. Zero or very few in designs made for others. My use case of autoincrement is certainly somehow peculiar. For some of DBs I use daily for managing my own business (I'm

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

2018-03-17 Thread Norman Dunbar
5. 5 tables in my first SQLite database. Cheers, Norm. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

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

2018-03-16 Thread Richard Hipp
On 3/16/18, R Smith wrote: > It's interesting to fathom what hypothesis is being tested with this pole... INSERT operations on a table with AUTOINCREMENT do a full-table scan against the sqlite_sequence table. I'm wondering if it is worthing adding extra logic to do some

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

2018-03-16 Thread R Smith
It's interesting to fathom what hypothesis is being tested with this pole... But it seems (from the on-forum replies anyway) that there are two very clear AUTOINCREMENT factions: Those who use it Everywhere, and those who use it Nowhere - which already is somewhat surprising to me.

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

2018-03-16 Thread Will Parsons
On Friday, 16 Mar 2018 11:37 AM -0400, 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? 0 -- Will ___ sqlite-users mailing list

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

2018-03-16 Thread petern
0 AUTOINCREMENT columns. A per column overload-able nextValue() interface could have its uses though. On Fri, Mar 16, 2018 at 8:37 AM, 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

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

2018-03-16 Thread Donald Shepherd
100s - we use it as part of the definition of some dynamically created tables that are dependent on the shape of the data we are receiving so can end up with a large number of them. On Sat, 17 Mar 2018 at 5:57 am, Doug Currie wrote: > 0 >

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

2018-03-16 Thread Doug Currie
0 ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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

2018-03-16 Thread Simon Slavin
0 When needed I use a declared INTEGER PRIMARY KEY. Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

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

2018-03-16 Thread Chris Locke
0, across approx 20 databases, ranging from small 3 table schemas, to a couple of ERP systems using 120+ tables. Thanks, Chris On Fri, Mar 16, 2018 at 4:09 PM, R Smith wrote: > Across 8 production systems and about 120 SQLite DBs for us - Not a single > AUTOINCREMENT -

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

2018-03-16 Thread Keith Medcalf
s prohibited by external (ie, Business) requirements. --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Ric

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

2018-03-16 Thread Jay Kreibich
Pretty much every table of every database, with the obvious exceptions like virtual tables. -j > On Mar 16, 2018, at 10:37 AM, 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

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

2018-03-16 Thread R Smith
Across 8 production systems and about 120 SQLite DBs for us - Not a single AUTOINCREMENT - so   0 . I have to confess though, there are less critical places where we use the ability of SQLite to insert and automatically incremented INT primary keys (so Non-AUTOINCREMENT keys), in case that is

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

2018-03-16 Thread Paul
0 In all of the few dozens of schemas. Rowid logic is almost perfect. In extremely rare cases, when primary key id is exposed outside of database, a custom table that keeps last allocated id is used. 16 March 2018, 17:37:31, by "Richard Hipp" : This is a survey, the

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

2018-03-16 Thread Scott Robison
0 On Mar 16, 2018 9:37 AM, "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 AUTOINCREMENT > in your overall

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

2018-03-16 Thread Richard Hipp
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 AUTOINCREMENT in your overall schema. You might compute this using: sqlite3 yourfile.db '.schema --indent' |