Re: [sqlite] Date time input

2019-10-09 Thread J Decker
On Wed, Oct 9, 2019 at 9:05 PM Keith Medcalf wrote: > > On Tuesday, 8 October, 2019 12:40, James K. Lowden < > jklow...@schemamania.org> wrote: > > >OK, but it needs a better name. What better place than here to debate > >that? ;-) > > >What the opposite of "Lite"? > > It's 'ite' as in 'stalagm

Re: [sqlite] Date time input

2019-10-09 Thread Keith Medcalf
On Tuesday, 8 October, 2019 12:40, James K. Lowden wrote: >OK, but it needs a better name. What better place than here to debate >that? ;-) >What the opposite of "Lite"? I believe the PC euphemism is Big and Tall. SQLBAT3? -- The fact that there's a Highway to Hell but only a Stairway to

Re: [sqlite] Date time input

2019-10-09 Thread Graham Holden
Tuesday, October 08, 2019, 7:39:40 PM, James K. Lowden wrote: > OK, but it needs a better name. What better place than here to debate > that? ;-) > SQLOfALot (providing you pronounce SQL as ess-queue-ell and not sequel) Graham ___ sqlite-users m

Re: [sqlite] SELECT uses index with SUBSTR but UPDATE doesn't

2019-10-09 Thread Keith Medcalf
minor correction, char(255) should be x'ff' ... char(255) does not return the byte 0xff, but x'ff' is the byte 0xff ... where (name between :prefix and (:prefix || x'ff') and substr(name, 1, length(:prefix)) collate nocase == :prefix) -- The fact that there's a Highway to Hell but only a Stai

Re: [sqlite] SELECT uses index with SUBSTR but UPDATE doesn't

2019-10-09 Thread Keith Medcalf
On Wednesday, 9 October, 2019 12:01, Jens Alfke said: >BETWEEN doesn't work well because it's inclusive, i.e. `BETWEEN 'foo' and >'fop'` doesn't work because it matches 'fop'. Coming up with the upper >end of a string prefix match is super annoying — `BETWEEN 'foo' and >'foo\xff' only works unti

Re: [sqlite] SELECT uses index with SUBSTR but UPDATE doesn't

2019-10-09 Thread Jens Alfke
> On Oct 9, 2019, at 10:02 AM, Keith Medcalf wrote: > > SUBSTR(name, 0, ?) is an expression, so unless you have an index on that > expression, then an index cannot be used to SEARCH for the rows. That's accurate in general. However, there _is_ a very similar special-case optimization for the

Re: [sqlite] [patch] avoid dynamic alloc in vdbeSorterSort(...)

2019-10-09 Thread Dominique Pellé
Keith Medcalf wrote: > > On Monday, 7 October, 2019 14:58, Dominique Pellé < > dominique.pe...@gmail.com> wrote: > > >Here the allocated size is fixed (always 64 pointers), so alloca does > >not seem needed. > > >I wonder how many other functions could avoid dynamic allocation > >like this one (e

Re: [sqlite] SELECT uses index with SUBSTR but UPDATE doesn't

2019-10-09 Thread Keith Medcalf
Unable to reproduce. In particular: >SELECT * FROM nodes WHERE SUBSTR(name, 0, ?) = ? >tells me that it can and will use the (primary key) index on the name >column. will not use the index. I can make it use an index by doctoring the table data to make the index scan cheaper than a table scan