[sqlite] Improving SQLite performance over a network

2015-09-10 Thread Eduardo Morras
On Thu, 10 Sep 2015 18:24:32 + (UTC) Mike McWhinney wrote: > Hello, > I am using SQLite in a Windows environment. The file storing the > database is on a Windows 2008 server.All other file access to this > server is reasonably fast. However, when doing simple SELECTS and > INSERTS/UPDATESit

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Roman Fleysher
Dear SQLiters, PRAGMA integrity_check is described to check UNIQUE and NOT NULL constraints. Does it check other CHECK constraints specified in the column definition? Thank you, Roman

[sqlite] Lovefield a new javascript sql engine from google

2015-09-10 Thread Domingo Alvarez Duarte
Hello ! I think that this can be of interest for some sqlite users https://google.github.io/lovefield/ . Cheers !

[sqlite] sql query

2015-09-10 Thread Eduardo Morras
On Thu, 10 Sep 2015 13:17:03 -0400 H?ctor Fiandor wrote: > Dear members: > > I am trying to use a SQL statement like this: > > fdm.tNegSerAct.SQL:='SELECT * FROM NegSerAct > > WHERE codNegSerAct >=desde AND codNegSerAct <=hasta > > ORDER BY codNegSerAct'; > but the trouble is that

[sqlite] Select after update get new or old values

2015-09-10 Thread Simon Slavin
On 10 Sep 2015, at 5:05pm, Nguyen Dang Quang wrote: > In (4) the selected rows will have old or new values? Read this: "Within a single database connection X, a SELECT statement always sees all changes to the database that are completed prior to the

[sqlite] bug in PRAGMA ignore_check_constraints?

2015-09-10 Thread Richard Hipp
On 9/10/15, Richard Hipp wrote: > On 9/10/15, Roman Fleysher wrote: >> Dear SQLiters, >> >> I am trying to temporarily disable CHECK constraint given in columns of >> table definition. As far as I understand, >> >> PRAGMA ignore_check_constraints='yes'; > > PRAGMA ignore_check_constraints=YES;

[sqlite] bug in PRAGMA ignore_check_constraints?

2015-09-10 Thread Richard Hipp
On 9/10/15, Roman Fleysher wrote: > Dear SQLiters, > > I am trying to temporarily disable CHECK constraint given in columns of > table definition. As far as I understand, > > PRAGMA ignore_check_constraints='yes'; PRAGMA ignore_check_constraints=YES; -- no quotes. > > should do it. However

[sqlite] PRAGMA integrity_check

2015-09-10 Thread Richard Hipp
On 9/10/15, Roman Fleysher wrote: > Dear SQLiters, > > PRAGMA integrity_check is described to check UNIQUE and NOT NULL > constraints. Does it check other CHECK constraints specified in the column > definition? > Apparently it does not. I thought it did. I'll add that to my list of things to

[sqlite] Rare database corruption - does this help?

2015-09-10 Thread Doug Nebeker
I'm hoping this might be of help to contribute to SQLite's robustness. We've got thousands of SQLite installations and they almost always work flawlessly. Every once in a while we get a corruption error and I finally have a log that catches it. SQLite has been in use in the project since

[sqlite] Improving SQLite performance over a network

2015-09-10 Thread Simon Slavin
On 10 Sep 2015, at 7:24pm, Mike McWhinney wrote: > All other file access to this server is reasonably fast. However, when doing > simple SELECTS and INSERTS/UPDATESit is noticeably slower on a network. I am > talking about 50 records. Have you created indexes appropriate to your WHERE and

[sqlite] Lovefield a new javascript sql engine from google

2015-09-10 Thread Simon Slavin
On 10 Sep 2015, at 7:20pm, Domingo Alvarez Duarte wrote: > Hello ! > > I think that this can be of interest for some sqlite users > https://google.github.io/lovefield/ . I think you're spamming your product. This mailing list is not for posting things of interest for some sqlite users.

[sqlite] Thread safety problem encountered by people working on WebKit

2015-09-10 Thread Scott Hess
On Thu, Sep 10, 2015 at 4:58 PM, Scott Hess wrote: > > The same basic logic applies to sqlite3_initialize()'s testing and setting > of sqlite3GlobalConfig.isInit , in a different thread+core the test can see > "true" before that core sees the setup implied by isInit being set to > "true". > BTW,

[sqlite] Improving SQLite performance over a network

2015-09-10 Thread Mike McWhinney
Hello, I am using SQLite in a Windows environment. The file storing the database is on a Windows 2008 server.All other file access to this server is reasonably fast. However, when doing simple SELECTS and INSERTS/UPDATESit is noticeably slower on a network. I am talking about 50 records. Now I

[sqlite] Feature request for sqlite3_initialize().

2015-09-10 Thread Scott Hess
On Sat, Sep 5, 2015 at 6:42 PM, Darin Adler wrote: > Michael is planning a workaround in WebKit that will call > sqlite3_initialize manually exactly once before WebKit uses sqlite, using > std::once to deal with the thread safety issue. > This reminds me ... I was recently working on a patch

[sqlite] Thread safety problem encountered by people working on WebKit

2015-09-10 Thread Scott Hess
On Sat, Sep 5, 2015 at 8:02 PM, Richard Hipp wrote: > On 9/5/15, Darin Adler wrote: > > Hi folks. > > > > I?m sending this on behalf of Michael Catanzaro, a contributor to the > WebKit > > open source project, who is working on a WebKit bug report, "Crash when > >

[sqlite] analyze

2015-09-10 Thread Simon Slavin
On 10 Sep 2015, at 8:05am, Ludovic Aubert wrote: > I am calling sqlite3_execute(db, "ANALYZE;") from a C program after a bunch > of CREATE and INSERT, > Then this program exits. Are you checking the result returned by that C call to make sure it is SQLITE_OK ? Simon.

[sqlite] Unexpected ordering when index exists

2015-09-10 Thread Oliver Kock
Ok, I understand. Thanks for your quick answers. Oliver > Date: Thu, 10 Sep 2015 15:31:02 +0100 > From: swithun at swithun.servebeer.com > To: sqlite-users at mailinglists.sqlite.org > Subject: Re: [sqlite] Unexpected ordering when index exists > > Hello > > OK> The result consists of 4 rows,

[sqlite] Unexpected ordering when index exists

2015-09-10 Thread Swithun Crowe
Hello OK> The result consists of 4 rows, in the following order: OK> "1""AB" OK> "4""AB" OK> "2""CD" OK> "5""CD" OK> Especially you can see that the result is sorted by column 'y'. OK> This is reproducible and I can't understand that. OK> When you remove the index ix_t1_y, the

[sqlite] Unexpected ordering when index exists

2015-09-10 Thread Oliver Kock
Hi sqlite mailing list, I'm experiencing unexpected ordering with a WHERE clause and an index on the filtered column. At first I'll state the reproduction steps: DROP TABLE IF EXISTS t1; CREATE TABLE t1(x, y); CREATE INDEX ix_t1_y ON t1(y); INSERT INTO t1(x,y) VALUES(1,'AB'); INSERT INTO

[sqlite] Unexpected ordering when index exists

2015-09-10 Thread Jakub Zakrzewski
Hi, SQL in general doe not make any guarantees about result ordering if you do not sort them. Use ORDER BY if you need to sort the results somehow. Otherwise expect nothing. -- Gruesse, Jakub -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org

[sqlite] Native sqlite4 on FreeBSD

2015-09-10 Thread Valentin Davydov
Hi, all! How to build native sqlite4 (preferrably statically linked shell only, without any extensions) on a recent version of FreeBSD? It has clang instead of gcc as a default system compiler, so makefiles bundled with sqlite sources don't work. Valentin Davydov.

[sqlite] sql query

2015-09-10 Thread Igor Korot
Hi, On Thu, Sep 10, 2015 at 1:17 PM, H?ctor Fiandor wrote: > Dear members: > > I am trying to use a SQL statement like this: > > fdm.tNegSerAct.SQL:='SELECT * FROM NegSerAct > > WHERE codNegSerAct >=desde AND codNegSerAct <=hasta > > ORDER BY codNegSerAct'; > > > > but the trouble is

[sqlite] Function lower on index expressions not allowed ?

2015-09-10 Thread Jan Nijtmans
2015-09-08 0:04 GMT+02:00 Richard Hipp : > My guess: You are using ICU or some other extension that is replacing > the built-in lower() function with another. And that extension is not > marking its new lower() function as SQLITE_DETERMINISTIC. >

[sqlite] Native sqlite4 on FreeBSD

2015-09-10 Thread Eduardo Morras
On Thu, 10 Sep 2015 14:22:24 +0300 Valentin Davydov wrote: > Hi, all! > > How to build native sqlite4 (preferrably statically linked shell only, > without any extensions) on a recent version of FreeBSD? It has clang > instead of gcc as a default system compiler, so makefiles bundled with >

[sqlite] Native sqlite4 on FreeBSD

2015-09-10 Thread Markus Hoenicka
At 2015-09-10 13:22, Valentin Davydov was heard to say: > Hi, all! > > How to build native sqlite4 (preferrably statically linked shell only, > without any extensions) on a recent version of FreeBSD? It has clang > instead of gcc as a default system compiler, so makefiles bundled with > sqlite

[sqlite] sql query

2015-09-10 Thread Héctor Fiandor
Dear members: I am trying to use a SQL statement like this: fdm.tNegSerAct.SQL:='SELECT * FROM NegSerAct WHERE codNegSerAct >=desde AND codNegSerAct <=hasta ORDER BY codNegSerAct'; but the trouble is that the variables ?desde? and ?hasta? are strings and fixed previously.

[sqlite] Select after update get new or old values

2015-09-10 Thread J Decker
which values does it have? By definition it should be old values. On Thu, Sep 10, 2015 at 9:05 AM, Nguyen Dang Quang wrote: > Dear all, > > I am using System.Data.SQLite for my .Net 2.0 application. > > In the app, I always run a sequence like that: > > 1. Open connection to sqlite and

[sqlite] Using collation instead a virtual table

2015-09-10 Thread Eduardo Morras
On Wed, 9 Sep 2015 09:54:28 -0400 Igor Tandetnik wrote: > On 9/9/2015 6:54 AM, Eduardo Morras wrote: > > Yes, the comparison operators work correctly and the b-tree binary > > search should give correct answers, the only tweak is in xCompare, > > that returns 0 when left(x) and rigth($value)

[sqlite] Function lower on index expressions not allowed ?

2015-09-10 Thread Igor Tandetnik
On 9/10/2015 7:52 AM, Jan Nijtmans wrote: > Just wondering, why doesn't ICU mark "upper" and "lower" > as SQLITE_DETERMINISTIC ? > My guess would be, because this code predates the existence of SQLITE_DETERMINISTIC

[sqlite] journal files not always removed

2015-09-10 Thread J Decker
Okay let's restart... maybe I misunderstood that Richard was able to reproduce this. I have figured out a simple script that with 3.8.11.1 windows (using binary download sqlite3.exe) causes the problem. running just 'sqlite3.exe' --- script --- .open test.db pragma journal_mode=wal; .open

[sqlite] Escape pathname to URL suitable for ATTACH

2015-09-10 Thread Clemens Ladisch
Zsb?n Ambrus wrote: > The documentation explains how to quote a filename to be suitable as > an URI path. Is there a C function in the public API that I can call > to do this quoting for me automatically? No. > It's also not clear to me how to quote filenames on unix if they > contain non-ascii

[sqlite] Escape pathname to URL suitable for ATTACH

2015-09-10 Thread Zsbán Ambrus
Hello, sqlite3 mailing list. The ATTACH command and the sqlite3_open function can take an URI instead of a plain filename, if sqlite3 is so configured. This is documented at "http://sqlite.org/uri.html;. This is useful, because it lets you specify extra options for attaching that you couldn't

[sqlite] analyze

2015-09-10 Thread Ludovic Aubert
Hello, I am facing a strange issue: I am calling sqlite3_execute(db, "ANALYZE;") from a C program after a bunch of CREATE and INSERT, Then this program exits. Another exe tries to perform some selects into the db, but it seems like ANALYZE had no effect and the queries take about 10 mn to

[sqlite] Does PRIMARY KEY imply NOT NULL?

2015-09-10 Thread Baruch Burstein
On Thu, Sep 10, 2015 at 12:04 AM, John McKown wrote: > On Wed, Sep 9, 2015 at 3:56 PM, Baruch Burstein > wrote: > > > Question in the subject > > > > -- > > > > > ?Answered on the SQLite web site: http://sqlite.org/lang_createtable.html Thank you. I knew I had seen something about this once,

[sqlite] Does PRIMARY KEY imply NOT NULL?

2015-09-10 Thread Baruch Burstein
Question in the subject -- ?u?op-?p?sdn s? ?o??uo? ?no? 's??? p??? u?? no? ??

[sqlite] Using collation instead a virtual table

2015-09-10 Thread Constantine Yannakopoulos
On Wed, Sep 9, 2015 at 10:59 PM, Scott Doctor wrote: > > Best practice when dealing with floating point is to normalize and Chop. In my line of business (ledger/ERP/retail) I don't think I can normalize but chopping is definitely performed ?on each operation that can produce rounding errors.