Re: [sqlite] UPDATE question

2013-09-07 Thread Peter Haworth
I do need to maintain the uniqueness of those two columns. I suppose I could drop the UNIQUE constraint an check for uniqueness in my code but I'm a great believer in having sqlite do as much as possible for me. The "Blue" vs "blue" issue is addressed by COLLATE NOCASE (at least I think it is -

Re: [sqlite] Calculating relative space used by tables

2013-09-07 Thread Simon Slavin
On 7 Sep 2013, at 2:16pm, Stephan Beal wrote: > i am curious whether there are tools out there which can show the relative > amounts of space used by tables in a db? i have no concrete need for one, > i'm just curious. Download the analyzer for your platform from

[sqlite] Calculating relative space used by tables

2013-09-07 Thread Stephan Beal
Hi, all, i am curious whether there are tools out there which can show the relative amounts of space used by tables in a db? i have no concrete need for one, i'm just curious. Curiosity being the step-mother of invention, though, here's a quick hack which does this for Linux...

Re: [sqlite] UPDATE question

2013-09-07 Thread Marc L. Allen
Yes, thanks. I was mistaken. On Sep 6, 2013, at 9:27 PM, "James K. Lowden" wrote: > On Fri, 6 Sep 2013 07:56:53 -0500 > "Marc L. Allen" wrote: > >> I don't think it's a bug. > > It is a bug as long as the behavior is in exception to

Re: [sqlite] Query preperation time does not scale linearly with growth of no. of tables

2013-09-07 Thread E.Pasma
The developers choose the C type 'int' to represent the hash value. Possibly this is too small for your case? Op 6 sep 2013, om 22:00 heeft Harmen de Jong - CoachR Group B.V. het volgende geschreven: On 6 sep. 2013, at 20:09, "Kevin Benson" wrote: Dr. Hipp does

Re: [sqlite] sqlite .import bug

2013-09-07 Thread Luuk
On 07-09-2013 07:16, dmitry babitsky wrote: *This works fine:* echo 1 | sqlite dbfile ".import '/dev/stdin' foo" But if you have any character (like a space, or newline), or sql statement in front of the '.import', sqlite gives: "Error near "." syntax error *Why it matters:* * * Because what

Re: [sqlite] UPDATE question

2013-09-07 Thread Luuk
On 07-09-2013 03:27, James K. Lowden wrote: On Fri, 6 Sep 2013 11:07:27 -0400 Richard Hipp wrote: The effect of early row updates might be visible in later row updates if you contrive a *sufficiently* complex example. But you really have to go out of your way to do that.

Re: [sqlite] UPDATE question

2013-09-07 Thread ibrahim
Further comment : If you want to implement a sequence of records in a table you can do it much faster with only on record to update when you insert a value in the middle of this sequence. For this purpose you shouldn't use a pseudo array but a single or double ended queue with only one

Re: [sqlite] UPDATE question

2013-09-07 Thread ibrahim
workaround for your problem : create table t1 (pk integer primary key, name text, seq integer) ; create unique index idxt1 on t1 (name,seq) ; insert into t1 values (1, 'blue', 1) ; insert into t1 values (2, 'blue', 2) ; insert into t1 values (3, 'blue', 3) ; insert into t1 values (4, 'blue', 4)

Re: [sqlite] How to use aux_data effectively?

2013-09-07 Thread Pepijn Van Eeckhoudt
On 07 Sep 2013, at 02:03, Peter Aronson wrote: > Ah, I see. Yeah, that would be trickier. You could save off the geometry > blob and the GEOSPreparedGeometry object in a structure passed in to > sqlite3_create_function and accessed via sqlite3_user_data and memcmp each >