Re: [sqlite] Ongoing SELECT sees INSERTed rows.

2013-02-21 Thread Keith Medcalf
You could also just order by rowid desc -- you wont visit rows with a rowid greater than the max(rowid) when the outer query started, and creation overhead for a b-tree to handle the order by will be avoided. --- Sent from Samsung Mobile  Original message From: Simon Slavin

Re: [sqlite] Query Plan with FTS Tables

2013-02-21 Thread GB
> > If you're using prefix queries, consider setting the prefix= option: > > > Try running the optimize command: > > > Show your FTS queries that are too slow. > Both prefix and optimize commands help to

Re: [sqlite] Ongoing SELECT sees INSERTed rows.

2013-02-21 Thread Simon Slavin
On 21 Feb 2013, at 6:56pm, Peter Aronson wrote: > Thanks! The possibility we were wondering about was having an integer > primary > key autoincrement column and just exiting the select loop when encountering a > id > greater than the max id at start time (I assume this

Re: [sqlite] import TXT file

2013-02-21 Thread Gert Van Assche
Thanks Kees. 2013/2/21 Kees Nuyt > On Thu, 21 Feb 2013 18:00:58 +0100, Gert Van Assche > wrote: > > >If I remove the double quotes, the problem is solved indeed. > >I'm working on windows. Do you know if there is an alternative to the SED > >command or

Re: [sqlite] import TXT file

2013-02-21 Thread Kees Nuyt
On Thu, 21 Feb 2013 18:00:58 +0100, Gert Van Assche wrote: >If I remove the double quotes, the problem is solved indeed. >I'm working on windows. Do you know if there is an alternative to the SED >command or tool? For just removing double quotes, I would recommend the tr

Re: [sqlite] Ongoing SELECT sees INSERTed rows.

2013-02-21 Thread Peter Aronson
- Original Message > From: Richard Hipp > To: General Discussion of SQLite Database > Sent: Thu, February 21, 2013 11:39:44 AM > Subject: Re: [sqlite] Ongoing SELECT sees INSERTed rows. > > On Thu, Feb 21, 2013 at 1:32 PM, Peter Aronson

Re: [sqlite] Ongoing SELECT sees INSERTed rows.

2013-02-21 Thread Richard Hipp
On Thu, Feb 21, 2013 at 1:32 PM, Peter Aronson wrote: > SQLite 3.7.15.2, Solaris and Windows (and presumably others). Journal > mode is > delete, but WAL appears to behave in the same manner. > > One of my coworkers ran into an infinite loop when accessing SQLite. >

[sqlite] Ongoing SELECT sees INSERTed rows.

2013-02-21 Thread Peter Aronson
SQLite 3.7.15.2, Solaris and Windows (and presumably others).  Journal mode is delete, but WAL appears to behave in the same manner. One of my coworkers ran into an infinite loop when accessing SQLite. Essentially an outer select loop was reading records, and an inner select loop was

[sqlite] I asked for an email sending me a new password/letting me reset

2013-02-21 Thread e-mail mgbg25171
I just got confirmation re sending me a new password/reset email but it hasn't arrived, Not being able to log in and not getting emails seems very strange ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] import TXT file

2013-02-21 Thread Gert Van Assche
found a good tool: http://findandreplace.codeplex.com/documentation problem solved... I think. thanks all for your help. 2013/2/21 Gert Van Assche > If I remove the double quotes, the problem is solved indeed. > I'm working on windows. Do you know if there is an

Re: [sqlite] import TXT file

2013-02-21 Thread Gert Van Assche
If I remove the double quotes, the problem is solved indeed. I'm working on windows. Do you know if there is an alternative to the SED command or tool? Or is there a way I can force sqlite3 to ignore these double quotes? thanks gert 2013/2/21 雷钦 > On 2013-02-21

Re: [sqlite] Do not read File change counter

2013-02-21 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21/02/13 06:51, Joost Voogt wrote: > ... it would be nice, to minimize the amount of reads and gain > performance, ... Even if that happened, how much performance would you expect to be gained? If the bytes are frequently read they will end up in

Re: [sqlite] Do not read File change counter

2013-02-21 Thread Richard Hipp
On Thu, Feb 21, 2013 at 9:51 AM, Joost Voogt wrote: > While tracking all the I/O that SQLite does I noticed that the same 16 > bytes are read over and over again. After some investigation I found out > that it is reading the File change counter to see if another process has

[sqlite] Do not read File change counter

2013-02-21 Thread Joost Voogt
While tracking all the I/O that SQLite does I noticed that the same 16 bytes are read over and over again. After some investigation I found out that it is reading the File change counter to see if another process has changed the database. As in this program there is only one read-only process

Re: [sqlite] import TXT file

2013-02-21 Thread Gert Van Assche
Mihael, I'll look for a developer who can compile the code for me. I'm not a developer. If I understand correctly, you wrote a tool to do a CSV import in an SQLite db in a much more controlled way, and if the import fails, we'll know at least why. With the code like it is now, can I use it on

Re: [sqlite] import TXT file

2013-02-21 Thread Gert Van Assche
Thanks Igor. I will look for that. 2013/2/21 Igor Tandetnik > On 2/21/2013 5:34 AM, Gert Van Assche wrote: > >> I have to import text files into an SQLite table. >> The txt files are plain text in UTF-8. They don't contain tabs and the >> line >> ending is CRLF. >> >> One

Re: [sqlite] import TXT file

2013-02-21 Thread Michael Black
I wrote an import util a while ago which might help you out as it's a bit more picky and gives more intelligent error messages than .import does. http://www.mail-archive.com/sqlite-users@sqlite.org/msg70182.html Show us some example lines and we can help a lot better.

Re: [sqlite] import TXT file

2013-02-21 Thread 雷钦
On 2013-02-21 13:15:16 +0100, Gert Van Assche wrote: > Roger, > > thanks for the advice, but I cannot work like this. I don't have the > possibility to rewrite the txt files I receive. > If I use the SQLite Expert, I get an error on "double-quote character" or a > "range error"... > > Any other

Re: [sqlite] import TXT file

2013-02-21 Thread Donald Griggs
Hi, Gert, Regarding: - the import is not done line per line Could you elaborate on what you mean by this? FYI, the separator can be a string of characters, if you need something highly unlikely to occur in the data, something like !@# for example. Are the import errors repeatable? I.e. does

Re: [sqlite] Query Plan with FTS Tables

2013-02-21 Thread Clemens Ladisch
GB wrote: > the regular Tables are not causing any grief. > Any hints of course are greatly apprechiated. If you're using prefix queries, consider setting the prefix= option: Try running the optimize command:

Re: [sqlite] import TXT file

2013-02-21 Thread Simon Slavin
On 21 Feb 2013, at 12:15pm, Gert Van Assche wrote: > thanks for the advice, but I cannot work like this. I don't have the > possibility to rewrite the txt files I receive. > If I use the SQLite Expert, I get an error on "double-quote character" or a > "range error"... > >

Re: [sqlite] import TXT file

2013-02-21 Thread Gert Van Assche
Roger, thanks for the advice, but I cannot work like this. I don't have the possibility to rewrite the txt files I receive. If I use the SQLite Expert, I get an error on "double-quote character" or a "range error"... Any other suggestions? thanks gert 2013/2/21 Roger Binns

Re: [sqlite] import TXT file

2013-02-21 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 21/02/13 02:34, Gert Van Assche wrote: > Does anyone see something obvious I'm doing wrong? There is no need to bash the SQLite shell into what you are trying to do. You can write your own code to read your file and insert each row into the

[sqlite] import TXT file

2013-02-21 Thread Gert Van Assche
All, I have to import text files into an SQLite table. The txt files are plain text in UTF-8. They don't contain tabs and the line ending is CRLF. One line in the TXT should become one record in the table. CREATE TABLE Source (Segments); .import 'test.txt '