I'm kind of confused with this new 'toy'...  I read the doc linked, but
kind of scratching my head.  I FULLY acknowledge this is an optional
parameter.

So you create a table with the WITHOUT ROWID optional command, and you'll
lose the effect of sqlite3_last_insert_rowid() after an insert, which by my
understanding, the last insert result into a table without the "WITHOUT
ROWID" is retained if applicable, so basically stale information.  I was
thinking that this particular command would be useful in a table with no
primary key, but maybe in a table of FKs back to a table with a primary key
(Say a list of contact infos to a person) but a requirement of having a
primary key in the FK-only table would be required.

The lack of the last_insert function is kind of concerning, especially if
you're making a "Person" list and you're simultaneously adding their
contact info in the next query in your program.  You've got no reliable
method of getting information back on the person you're inserted.  So,
obviously, you wouldn't use it here.

If you're going to query the FK-only table against the Person table, you'd
obviously have an index on the FK field.  You'd probably never take a look
at a "primary key" in the FK-Only table, so having the additional
requirement of a PK in this table seems redundant.  I also know that rowid
already exists regardless if I use it or not in all tables prior to 3.8.2.

Maybe the coffee hasn't reached my brain yet, but but can someone give me
an "English" example of a use case where you'd use this reliably?

I'm ALWAYS looking for a faster query (Who isn't? -- Except those edge
cases where management thinks the software is broken because the query is
TOO fast and doesn't trust the results) but the loss of some common use
functionality kind of has me wondering "Why?"
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to