Re: [sqlite] Unsigned

2018-08-24 Thread Darren Duncan
On 2018-08-20 11:46 PM, D Burgess wrote: Is there a historical reason why sqlite does not have a UNSIGNED type to go with INTEGER? What is the value of a built-in UNSIGNED type when we already have INTEGER? I can't think of any. -- Darren Duncan

Re: [sqlite] keys

2018-08-24 Thread Keith Medcalf
On Friday, 24 August, 2018 17:31, w...@us.net wrote: >"The parent key of a foreign key constraint is not allowed to use the >rowid. The parent key must used named columns only." >Why is this? You should think of this as: >"The parent key of a foreign key constraint is not allowed to use the

Re: [sqlite] keys

2018-08-24 Thread Simon Slavin
On 25 Aug 2018, at 12:31am, w...@us.net wrote: > "The parent key of a foreign key constraint is not allowed to use the rowid. > The parent key must used named columns only." > > Why is this? Because it's not named. In theory you could later add a column named 'rowid' to mean a BLOB column.

Re: [sqlite] keys

2018-08-24 Thread ward
got it. Thanks. On 2018-08-24 19:36, J Decker wrote: On Fri, Aug 24, 2018 at 4:31 PM wrote: "The parent key of a foreign key constraint is not allowed to use the rowid. The parent key must used named columns only." Why is this? Which would be more efficient? 1) WITHOUT ROWID and column of

Re: [sqlite] keys

2018-08-24 Thread J Decker
On Fri, Aug 24, 2018 at 4:31 PM wrote: > "The parent key of a foreign key constraint is not allowed to use the > rowid. The parent key must used named columns only." > > Why is this? > Which would be more efficient? > 1) WITHOUT ROWID and column of INTEGER PRIMARY KEY > or > 2) an aliased rowid.

[sqlite] keys

2018-08-24 Thread ward
"The parent key of a foreign key constraint is not allowed to use the rowid. The parent key must used named columns only." Why is this? Which would be more efficient? 1) WITHOUT ROWID and column of INTEGER PRIMARY KEY or 2) an aliased rowid. Background: The data is sparse, incomplete, and

Re: [sqlite] Query optimisation

2018-08-24 Thread David Wellman
Hi Richard and David, Many thanks for your responses, very useful. I'll work with that (being careful to look at the OpCode documentation for my release of sqlite!) and see where I get to. Cheers, Dave Ward Analytics Ltd - information in motion Tel: +44 (0) 118 9740191 Fax: +44 (0) 118

Re: [sqlite] Query optimisation

2018-08-24 Thread Richard Hipp
On 8/24/18, David Raymond wrote: > Running just "explain some query" will give you the virtual machine program > that it plans on using. You can then scan through that to see what it's > doing. Note that the descriptions on the below page for those op codes are > sometimes really confusing and it

Re: [sqlite] Query optimisation

2018-08-24 Thread David Raymond
Running just "explain some query" will give you the virtual machine program that it plans on using. You can then scan through that to see what it's doing. Note that the descriptions on the below page for those op codes are sometimes really confusing and it can take a while to decypher what's

[sqlite] Query optimisation

2018-08-24 Thread David Wellman
HI all, I would like to use the following example as a learning exercise for myself to check my understanding of part of sqlite processing. I have the following query which functionally works fine, and to be upfront about it the volume of data is so small that performance is not an issue.