[sqlite] Why does a query run 50x slower across a network?

2017-02-06 Thread dandl
We have an application we converted from Access to Sqlite. Mostly it's been a great success, but we have two queries that runs 50x slower across a gigabit LAN than on a local file system and we don't know why. Performance on Access was perfectly acceptable, and on Sqlite is not and we can't

Re: [sqlite] BUG: Illegal initialization in icu.c : sqlite3IcuInit

2017-01-31 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of James K. Lowden >>>Despite the fact that the Windows API is defined in terms of C, Microsoft >>>evidently and probably correctly has decided its market does not demand a >>>modern C compiler. The Microsoft

[sqlite] Sqlite on C99/C11 (was: RE: BUG: Illegal initialization in icu.c : sqlite3IcuInit)

2017-01-31 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of James K. Lowden Basing source on "ANSI C" (as much as possible) just gives you the biggest possible distribution / compatibility. >>> >>>Yes, but it also limits you to C as it stood 20 years ago.

Re: [sqlite] BUG: Illegal initialization in icu.c : sqlite3IcuInit

2017-01-30 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Hick Gunter >>>Integer promotion is usually ok between integers of the same signedness. For some definition of 'OK'. >>>However, in unsigned char uns = 0xff; long val = uns; >>>what should be

Re: [sqlite] BUG: Illegal initialization in icu.c : sqlite3IcuInit

2017-01-27 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of James K. Lowden >>>Sticking with C90 is perfectly rational if you're still running Windows 98 >>>on a Pentium III at 500 Mhz with 256 MB RAM. Else, really, it's not too >>>soon to adopt a 6-year old

Re: [sqlite] BUG: Illegal initialization in icu.c : sqlite3IcuInit

2017-01-26 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of David Empson >>>The ANSI/ISO C 1990 standard states this in section 6.5.7, under Constraints: >>>“All the expressions in an initializer for an object that has static storage >>>duration or in an initializer

Re: [sqlite] BUG: Illegal initialization in icu.c : sqlite3IcuInit

2017-01-26 Thread dandl
>>>From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On >>>Behalf Of Ziemowit Laski Sent: Thursday, 26 January 2017 7:36 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] BUG: Illegal initialization in icu.c : sqlite3IcuInit >>> >>>Visual C++ correctly catches

Re: [sqlite] warning on glob [was: SQLite3 Tutorial error]

2017-01-07 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Will Parsons >>>I dug up some old references to investigate this further: >>>a) The UNIX C Shell Field Guide (1986): Ranges in the pattern [lower-upper] mentioned, no mention of negation of pattern.

Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin > How about adding the above to the permanent docs? >>>SQLite docs do not usually include examples or tutorial information. It >>>would be more consistent just to take the text which is

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf >>>SQLite does not use the glob function from the standard library -- the >>>function is defined in func.c >>> >>>Both "glob" and "like" call the same function, likeFunc with different sets

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin >>>They’re probably using the external function interface to override the >>>internal globbing function. And by the look of the results at least one of >>>the programmers involved thinks that

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread dandl
A question: this appears to be the Posix standard for globbing ie Patterns Used for Filename Expansion: http://pubs.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_013_003 And this is Linux: https://linux.die.net/man/7/glob Is this what Sqlite intends to conform to? Because the

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf >>>Yes. The GLOB was invented on Unix. I posted an example of the Unix >>>filename globbing (which has not changed, to my knowledge, since the 60's), >>>which works exactly the same as the

Re: [sqlite] Frequent database corruptions on Windows 10

2016-09-10 Thread dandl
> I think that the System.Data.SQLite is compiled in the multi-thread > mode and I did not find a function or option to switch it to > serialized mode, but on the other hand all the different programs > showed no problems in the last years and only started to make trouble > after my upgrade from

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-14 Thread dandl
> We change internal-use #defines and other internal-use symbols on just about > every release. This has never before caused breakage that we are aware of. > Or if it has caused breakage, the developers doing such things are aware that > what they are doing is not allowed and have the good sense

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-13 Thread dandl
> Good point, though personally I would weigh this in a different class of > backward compatibility changes. I agree, but I have no evidence either way. You never really know what a customer is doing until you change something they were using. > I don't think changing this would be bad. > But I

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-11 Thread dandl
> Try to write a fully standard compliant standard library without using any of > the reserved namespace!!! This is the key point that has been missed so far. The C/C++ standards do not provide a mechanism by which the supplier of a library can reserve or sequester some range of identifiers, for

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-09 Thread dandl
> Obviously the standard is broken/incorrect or your interpretation of it is > broken/incorrect. No, and the standard was very carefully written to say this, and it's easy to find references to back up this interpretation if you care to look for them. Or ask a question on SO. > Most API headers

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-09 Thread dandl
> Using clang 3.8 with -Wreserved-id-macro (enabled by -Weverything), I just > noticed that SQLite uses include guards with a leading underscore, for > example _SQLITE3_H_ in the amalgamation. According to the C standard, this is > a reserved identifier, leading to undefined behavior: > > > All

Re: [sqlite] Question about C# with SQLite

2016-07-04 Thread dandl
Did you mean: SQLite.Intero.dll or SQLite.Interop.dll? Did you put it in the right place? Also consider the question of 32 vs 64 bit. Did you try Stack Overflow? There are lots of hits over there. Regards David M Bennett FACS Andl - A New Database Language - andl.org > -Original

Re: [sqlite] Locking semantics are broken?

2016-06-28 Thread dandl
ing semantics are broken? > > > On 28 Jun 2016, at 9:07am, dandl <da...@andl.org> wrote: > > >> Do not use SQLite for concurrent access over a network connection. > >> Locking semantics are broken for most network filesystems, so you > >> will have corruption

[sqlite] Locking semantics are broken?

2016-06-28 Thread dandl
> Do not use SQLite for concurrent access over a network connection. Locking > semantics are broken for most network filesystems, so you will have > corruption issues that are no fault of SQLite. I have seen this comment made more than once on this list. Is there any reliable evidence to support

Re: [sqlite] Postgres vs MySQL (was Re: Messages posted on Nabble not getting to list)

2016-05-29 Thread dandl
Good summary, agree 100%. >From experience, Postgres is amazingly configurable, if you ever want to do something weird. Sqlite is too, but only if you access it directly in C and don't really need a server. And the guys working on the internals (both) are the smartest bunch you're likely to run

Re: [sqlite] What could be the cause of a zero length database file?

2016-05-27 Thread dandl
> Having an sqlite connection open on a deleted file can also happen in posix > land... Section 2.4 of "How to Corrupt" claims it can't happen on windows, I > guess that's technically true as in this scenario the file was deleted before > being opened, but it might be worth mentioning anyway

Re: [sqlite] Problem loading sqlite3.dll on Windows XP

2016-05-25 Thread dandl
> I am using the provided sqlite3.dll from the download section which causes > problems in Windows XP. > > Our application uses a dynamic dll which is statically linked to sqlite3.dll > (32 bit) using a lib generated from the dll and def file. On Windows 7 there > is no problem, but on windows XP

Re: [sqlite] What could be the cause of a zero length database file?

2016-05-25 Thread dandl
> I assume you've read . Thanks. Yes, I had read it but it was worth a refresh. The very last item gave pause...race condition on Windows. See below. > It's worth stating that a zero-length database causes no problem for SQLite. > It does not trigger

Re: [sqlite] What could be the cause of a zero length database file?

2016-05-24 Thread dandl
At present I can't answer that. I can't reliably reproduce the problem (and never in the debugger) so I don't yet really know what the critical factor is. What I'm trying to understand is what guarantees Sqlite makes. If we assume a perfectly valid sequence of SQL and API calls ending with

[sqlite] What could be the cause of a zero length database file?

2016-05-24 Thread dandl
The sequence is: * open a new database file * issue a sequence of several SQL commands in a single transaction (one BEGIN, one COMMIT at the end). The database ends up as a zero length file. Is this a) a normal consequence of the above if the single transaction is aborted (say due to an SQL

[sqlite] Sqlite incompatibility with Postgres

2016-05-22 Thread dandl
> > Every aggregation function is at least second order: a function that > > applies a function to the set. So for MIN the function is 'less than', > > for SUM() the function is 'plus' and so on. In Andl aggregation > > functions are provided by fold(), which takes a function as an > > argument. >

[sqlite] Sqlite incompatibility with Postgres

2016-05-21 Thread dandl
> Actually, MIN still is fundamentally a first-order itself. The dyadic > function call "x min y" returns either x or y depending on how they compare. > The list form is then repeated application of the binary min(). This is > directly comparable to your example of list plus/sum which is

[sqlite] Sqlite incompatibility with Postgres

2016-05-20 Thread dandl
> That's an interesting perspective. If you're dealing with genuine sets, and > you define your language in terms of second-order operations, then something > like LIMIT could be included. Would have to be, I guess. Every aggregation function is at least second order: a function that applies a

[sqlite] Sqlite incompatibility with Postgres

2016-05-19 Thread dandl
> Restriction is applied to the values of the tuple. The number of tuples is > not a value of the tuple. No, I can't agree. Restriction is a membership test, a function on members: should this tuple be included in the result set or not? Cardinality of a set is a second order function on the

[sqlite] Sqlite incompatibility with Postgres

2016-05-18 Thread dandl
> > Consider this set of integers: 1,3,5,7,42,99,83,11,83,83 > > > > In this case, there is no subset S1 of size 3 that satisfies your > criterion. In an SQL query, the set returned by LIMIT 3 would not be defined > uniquely. > > What you've both said is essentially the point I was trying to

[sqlite] Sqlite incompatibility with Postgres

2016-05-18 Thread dandl
> Or we'll answer my original question by breaking down one of the above two > options. The documentation for the implementation may simply say that the > order will be consistent in any one database connection, without ever saying > what the order will be. This is perfectly consistent with

[sqlite] Sqlite incompatibility with Postgres

2016-05-18 Thread dandl
> The "problem" is to produce 3 rows where, relationally, the only answers have > 2 or 4 rows. There is no right answer to the problem because there is no > answer to the problem. Which is what I said. The solution with 3 rows is unambiguous. You either resolve this the way the standard does by

[sqlite] Sqlite incompatibility with Postgres

2016-05-18 Thread dandl
> I am quite certain nevertheless that LIMIT has no relational basis. > Nothing based on Order By could. Then you are mistaken. 1. Consider the following set S of integers: 1,3,5,7,42,99,83,11. 2. Divide it into two subsets such that S1 is of size 3 and all members of S1 are larger than those

[sqlite] Sqlite incompatibility with Postgres

2016-05-17 Thread dandl
> > > > first second > > > > - -- > > > > MarkSpark > > > > Emily Spark > > > > MarySoper > > > > Brian Soper > > > > > > > > SELECT first,second FROM members ORDER BY second LIMIT 3 > > First, hat tip to Simon for providing a motivating example. :-) > > The question

[sqlite] Sqlite incompatibility with Postgres

2016-05-16 Thread dandl
> > All true. But it brings up a question. Suppose the following: > > > > first second > > - -- > > MarkSpark > > Emily Spark > > MarySoper > > Brian Soper > > > > SELECT first,second FROM members ORDER BY second LIMIT 3 > > > I think a proper

[sqlite] Podcast with Dr Hipp: SQLite history, success and funding

2016-05-15 Thread dandl
> > 1. Why SQLite is popular. > > The answers to those question mentioned in the podcast may be good ones but I > think the main reason is that it's free. Completely, unmistakably, free. Necessary but not sufficient. It's free, and the licence is as non-restrictive as it is possible to be. >

[sqlite] 64bit DLL vs 32bit

2016-05-15 Thread dandl
> > But I think if you compile code for the x64 processor chip and call it > > from x86 or vice versa then either it doesn't work or you pay a high > > price for thunking from one to the other. I think that's unavoidable > > regardless of OS. > > Right: doesn't work. There's no performance

[sqlite] Sqlite incompatibility with Postgres

2016-05-15 Thread dandl
> I suggest the reason LIMIT hasn't been standardized is that it's contrary to > the fundamental idea that rows in a table have no meaningful order. SQL > doesn't honor relational theory with complete > fidelity, but at least that horse is still in the barn. Point 1: I think you'll find plenty

[sqlite] 64bit DLL vs 32bit

2016-05-15 Thread dandl
> > Actually, it's everyone using a language other than C/C++, plus a > > proportion of those too. I use C#, but if you want to call Sqlite from > > Java, Python, etc or even some generic C/C++ app that supports > > plug-ins, then at some point there is a DLL > > How does that follow? Any

[sqlite] Sqlite incompatibility with Postgres

2016-05-14 Thread dandl
Saturday, 14 May 2016 6:28 AM > To: SQLite mailing list > Subject: Re: [sqlite] Sqlite incompatibility with Postgres > > On 2016-05-13 7:07 AM, dandl wrote: > > I checked a copy of the > > 2003 standard and there doesn't seem to be anything similar. I don't > > ha

[sqlite] Sqlite incompatibility with Postgres

2016-05-14 Thread dandl
> It would also be very minor to add "UNION -1" as a synonym for "UNION ALL", > but "being minor" is not an argument for doing so. > While the mentorship of Postgres is undoubted, there is/was never a drive, > nor a need for full (or even partial) compatibility with "Postgres" per se, > mostly

[sqlite] Sqlite incompatibility with Postgres

2016-05-13 Thread dandl
> > Richard Hipp seems to be on record as saying: > > "SQLite can be thought of as a derivative of PostgreSQL. SQLite was > > originally written from PostgreSQL 6.5 documentation, and the SQLite > > developers still use PostgreSQL as a reference platform to verify that > > SQLite is working

[sqlite] Sqlite incompatibility with Postgres

2016-05-13 Thread dandl
> > Sqlite accepts (but Postgres does not): > > LIMIT -1 OFFSET nnn > > LIMIT -1 > > > > These all have the same meaning of no limit, but there is no common > > ground in the syntax. > > Yes and Yes. Documented behaviour. There are some strange situations if the > two clauses can't both be

[sqlite] Sqlite incompatibility with Postgres

2016-05-12 Thread dandl
It's a minor point, but can someone confirm that: Postgres accepts (but Sqlite does not) LIMIT ALL LIMIT ALL OFFSET nnn OFFSET nnn Sqlite accepts (but Postgres does not): LIMIT -1 OFFSET nnn LIMIT -1 These all have the same meaning of no limit, but there is no common ground in the syntax.

[sqlite] 64bit DLL vs 32bit

2016-05-12 Thread dandl
> bounces at mailinglists.sqlite.org] On Behalf Of Simon Slavin > There must be a Windows element in there, though. On the Mac I can create a > create a project in Xcode which has C, C++, Objective-C, Java and Python code > in (probably other languages too) and they can all call functions in

[sqlite] 64bit DLL vs 32bit

2016-05-11 Thread dandl
> bounces at mailinglists.sqlite.org] On Behalf Of Simon Slavin > It's only a certain kind of Windows user who wants DLLs for everything. If > that's what you need you are going to have to make sure you get the right > DLL. But the fact that most SQLite programmers don't use a DLL is why you're

[sqlite] SELECT DISTINCT question

2016-05-10 Thread dandl
s often stated as "some random row" because the > visitation order is an implementation detail of the query planner and may > change from query to query based on the "shape" of the data and the > particulars of how the query is solved internally.) > > > > -

[sqlite] SELECT DISTINCT question

2016-05-10 Thread dandl
> bounces at mailinglists.sqlite.org] On Behalf Of Keith Medcalf > Why are you using BOTH distinct and group by on the same column? You only > need one or the other. If you are redundantly redundant I would hope that > the optimizer makes redundant (as in gets rid of, for those that are not >

[sqlite] SELECT DISTINCT question

2016-05-10 Thread dandl
> Von: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users- > bounces at mailinglists.sqlite.org] Im Auftrag von Scott Robison > Gesendet: Montag, 09. Mai 2016 08:13 > An: SQLite mailing list > Betreff: Re: [sqlite] SELECT DISTINCT question > > On Sun, May 8

[sqlite] SELECT DISTINCT question

2016-05-10 Thread dandl
lf Of Scott Robison > Sent: Monday, 9 May 2016 4:13 PM > To: SQLite mailing list > Subject: Re: [sqlite] SELECT DISTINCT question > > On Sun, May 8, 2016 at 7:45 PM, dandl wrote: > > > Just to add to the below: > > > > S#| SNAME | STATUS | CITY > &g

[sqlite] SELECT DISTINCT question

2016-05-09 Thread dandl
sts.sqlite.org [mailto:sqlite-users- > bounces at mailinglists.sqlite.org] On Behalf Of dandl > Sent: Monday, 9 May 2016 11:28 AM > To: 'SQLite mailing list' > Subject: [sqlite] SELECT DISTINCT question > > I have the following query: > > SELECT DISTINCT "EVALA112"(&q

[sqlite] SELECT DISTINCT question

2016-05-09 Thread dandl
I have the following query: SELECT DISTINCT "EVALA112"("S#") AS "^" FROM "S" ORDER BY "S#" ASC ; [This is generated code, not hand-written. The table S is from CJ Date sample data.] This query appears to work correctly. The function is an aggregation, and requires the data to be sorted. This

[sqlite] SQLite vs GPLed software

2016-05-03 Thread dandl
>From a purely numerical point of view, the largest numbers would be found in devices, eg phones, cars, TVs, clocks/timers, etc. Lots of GPL in there, but also lots of other licences too. I have no idea how the GSM stack is licensed, for example, but I think there are more GSM phones than