Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread ohadp
what about the differences between the FULL and PARTIAL modes of pragma synchronous ? -- View this message in context: http://www.nabble.com/how-can-i-speed-up-inserts---tf3186848.html#a8860860 Sent from the SQLite mailing list archive at Nabble.com.

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread DragonK
On 2/8/07, Dennis Cote <[EMAIL PROTECTED]> wrote: DragonK wrote: > > > Well, using transactions would be a little difficult, because I have a > library which does something like logging to a database. Using > transaction > on a single insert would be useless in my opinion, and on the other >

Re: [sqlite] Select and deletion

2007-02-07 Thread DragonK
On 2/8/07, Jay Sprenkle <[EMAIL PROTECTED]> wrote: On 2/7/07, DragonK <[EMAIL PROTECTED]> wrote: > > > This seems to work... but I'm not sure if it should, that's why I'm > asking. > I hope the code will show more exactly what I intend to do. Sorry for the > lack of proper error checking, it's

RE: [sqlite] ATTACH and :memory: databases

2007-02-07 Thread Dan Kennedy
On Wed, 2007-02-07 at 11:12 -0800, Dave Gierok wrote: > I have one :memory: database open and I want to make a copy of it into > another :memory: database. Ah, I get it now. Misunderstood earlier. A new in-memory database is created each time ':memory:' is attached (using ATTACH) or opened

Re: [sqlite] Select and deletion

2007-02-07 Thread Jay Sprenkle
On 2/7/07, DragonK <[EMAIL PROTECTED]> wrote: This seems to work... but I'm not sure if it should, that's why I'm asking. I hope the code will show more exactly what I intend to do. Sorry for the lack of proper error checking, it's just a test program. :) Also, I'm not using any transactions,

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Jay Sprenkle
On 2/7/07, ohadp <[EMAIL PROTECTED]> wrote: luckily this isn't mission critical failure, i'll take the risk that one out of ten thousand users experiences database corruption. i can only batch the inserts into maybe 4-5 a time, don't know how much of an improvement that will be... If

Re: [sqlite] What does this mean???

2007-02-07 Thread Clark Christensen
Jim, Line 398 in dbdimp.c appears to be in DBD-SQLite's $sth->execute code. I agree with Puneet. If you wrap your DBI calls in eval blocks and test $@, you might get more info about the error (or maybe not). Also, setting RaiseError, and ShowErrorStatement in $dbh wouldn't hurt. $dbh =

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Gerry Snyder
ohadp wrote: when you say much less do you mean one in 1,000 or 1 in 1,000,000 ? Gerry Snyder-3 wrote: If you really can't get more than 4-5 in a batch, it's your call whether the time saving is worth the risk. BTW, the problem rate should be much less than one in ten thousand. Sorry. I

RE: [sqlite] What does this mean???

2007-02-07 Thread Anderson, James H \(IT\)
Yes, I printed out the errstr. That was what I sent in the original mail. $sth = $dbh->prepare( $sql ) or die $dbh->errstr; $sth->executeor die $dbh->errstr; which produced: not an error(21) at dbdimp.c line 398 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread ohadp
when you say much less do you mean one in 1,000 or 1 in 1,000,000 ? Gerry Snyder-3 wrote: > > If you really can't get more than 4-5 in a batch, it's your call whether > the time saving is worth the risk. BTW, the problem rate should be much > less than one in ten thousand. > > Gerry > >

RE: [sqlite] What does this mean???

2007-02-07 Thread Anderson, James H \(IT\)
sqlite-version: 3.3.5 DBD-SQLite: 1.12 -Original Message- From: Clark Christensen [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 6:15 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] What does this mean??? What version of SQLite, and what version of DBD-SQLite? I saw

Re: [sqlite] What does this mean???

2007-02-07 Thread P Kishor
On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]> wrote: Context :) insert or replace into TMP_credDerivOrig select A.date, .. A.CDRefId from TMP_credDerivOrig A, C1_credDerivComment B where A.CDId = B.CDId; yes, but you want to know why an error is appearing, so you have

Re: [sqlite] What does this mean???

2007-02-07 Thread Clark Christensen
What version of SQLite, and what version of DBD-SQLite? I saw this predictably with DBD-SQLite 1.09 and SQLite 3.2.7 where I did something like: $sth = $dbh->prepare("select foo, bar from mytable where rowid = ?"); for $i (1..5) { ($myfoo, $mybar) = $dbh->selectrow_array($sth,

RE: [sqlite] What does this mean???

2007-02-07 Thread Anderson, James H \(IT\)
Context :) insert or replace into TMP_credDerivOrig select A.date, A.CDId, A.CDName, A.CDTicket, A.tradeId, A.tapsAccount, A.CDBook, coalesce(A.CDFid,'') CDFid, A.CDStatus, A.CDTradeDate, A.CDExpDate, A.CDNotional, A.CDCurr, A.CDSellBuy, A.CDType, A.CDExerType, A.CDEntity, A.CDCusip,

[sqlite] sqlite via jdbc on Mac OS X Tiger

2007-02-07 Thread P Kishor
volks, I need to do some prototyping, heck, maybe even final-typing, using (*shudder*) Java. Is there a jdbc driver for SQLite that works on Mac OS X? Essentially, I need to pull in the data from the database into a Java program which will then do its thang with it. -- Puneet Kishor

Re: [sqlite] What does this mean???

2007-02-07 Thread P Kishor
On 2/7/07, Anderson, James H (IT) <[EMAIL PROTECTED]> wrote: not an error(21) at dbdimp.c line 398 I'm using DBD::SQLite and got this error. What does it mean and how best to hanle it? well, how about some context? What is the structure of the table(s) you are querying, what is the query,

[sqlite] What does this mean???

2007-02-07 Thread Anderson, James H \(IT\)
not an error(21) at dbdimp.c line 398 I'm using DBD::SQLite and got this error. What does it mean and how best to hanle it? Thanks, jim NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive

Re: [sqlite] ATTACH and :memory: databases

2007-02-07 Thread Dennis Cote
Dave Gierok wrote: When I open the 2nd :memory: database and call attach on the first one specifying ':memory:' as the file name, Dave, You can't do that. You need to attach the second memory database to the memory database you already have open. Each time you open or attach to :memory:

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Dennis Cote
DragonK wrote: Well, using transactions would be a little difficult, because I have a library which does something like logging to a database. Using transaction on a single insert would be useless in my opinion, and on the other hand I can't use transactions on the all inserts, since

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
When searching for this problem the first one I found was one from myself of a few years back: http://shorterlink.co.uk/6813 So, I think this is what the trouble is and nil to do with SQLite. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 07 February 2007

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
It looks this crash only happens if the data in one one array element exceeds about 4000 characters or more precisely when the data in one element (row and column) of the database exceeds about 4000 characters. Maybe after all this is not a SQLite problem, but a VB problem and maybe VB arrays

Re: [sqlite] Extension functions for SQLite in C for free

2007-02-07 Thread Mikey C
No problem, attached is the raw source code, no binaries. Ralf Junker wrote: > > Hello Mikey C, > >>If anyone is having problems downloading the file (which is large as it >>contains debug & release binaries and all the obj files), please email me at >>[EMAIL PROTECTED] and I'll email just

RE: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread epankoke
1. When the application first starts up, click on the Servers icon in the middle of the window. Alternatively, select Tools | Server | Server Manager. 2. For Server Engine, select SQLite (of course). If you're still using 2.x, go to step 4. 3. Select the options tab, put 3 in the first box

Re: [sqlite] Extension functions for SQLite in C for free

2007-02-07 Thread Ralf Junker
Hello Mikey C, >If anyone is having problems downloading the file (which is large as it >contains debug & release binaries and all the obj files), please email me at >[EMAIL PROTECTED] and I'll email just the raw source code only. Would it be possible to upload just the raw source code as a

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Ralf Junker
Hello Nemanja Corlija, >>PS: For anyone interested: The new SQLiteSpy with table cell editing is now >>available at http://www.yunqa.de/delphi/sqlitespy/ >Ralf, thanks SQLiteSpy. Download link is not working though. Thanks for reporting the problem. The link is now fixed and working all right.

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Kees Nuyt
On Wed, 7 Feb 2007 13:03:09 -0500, you wrote: >I can't get SQLiteExplorer to work with my databases. It always gives >me an "unknown file format" error. I believe it's been quite a while >since it was updated. > >RobR Did you download sqlite3explorer or sqliteexplorer? The latter is meant

Re: [sqlite] Extension functions for SQLite in C for free

2007-02-07 Thread Mikey C
No problem. If anyone is having problems downloading the file (which is large as it contains debug & release binaries and all the obj files), please email me at [EMAIL PROTECTED] and I'll email just the raw source code only. Mikey Jay Sprenkle wrote: > > Thanks for sharing MIkey. > > On

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Nemanja Corlija
On 2/7/07, Ralf Junker <[EMAIL PROTECTED]> wrote: PS: For anyone interested: The new SQLiteSpy with table cell editing is now available at http://www.yunqa.de/delphi/sqlitespy/ Ralf, thanks SQLiteSpy. Download link is not working though. -- Nemanja Corlija <[EMAIL PROTECTED]>

RE: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Ralf Junker
Hello Robert Simpson, >For the SQLite ADO.NET wrapper, I actually wrote two functions into the core >engine to help me retrieve key information. My requirements were a little >more complex than just getting rowid, but here's what I did to get me that >far at least: > >Given a sqlite_stmt pointer

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread DragonK
On 2/7/07, John Stanton <[EMAIL PROTECTED]> wrote: DragonK wrote: > On 2/7/07, Ken <[EMAIL PROTECTED]> wrote: > >> >> Try without the pragma and wrap the inserts with a begin transaction >> and a >> commit... >> >> The performance will be almost as good as with the pragma, with the >> added

Re[4]: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Teg
Hello DragonK, Essentially, when you have 1000's of uses banging on your software, many with poorly maintained/infected machines things that seldom happen on well maintained PC's will happen all the time. Some of my users have daily Windows crashes and assume that it's a normal experience for

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread John Stanton
DragonK wrote: On 2/7/07, Ken <[EMAIL PROTECTED]> wrote: Try without the pragma and wrap the inserts with a begin transaction and a commit... The performance will be almost as good as with the pragma, with the added benefit of consistent data and no corruption in the event of a crash

RE: [sqlite] ATTACH and :memory: databases

2007-02-07 Thread Dave Gierok
I have one :memory: database open and I want to make a copy of it into another :memory: database. When I open the 2nd :memory: database and call attach on the first one specifying ':memory:' as the file name, it allows me to do this. However when I loop through the tables copying them into

RE: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Rob Richardson
For the life of me, I can't figure out how to open a database in DBManager. I looked at it before, tried for an hour, and erased it. I just tried again, with the same result. If I can't figure out how to do such an easy thing, I can't trust the program. RobR -Original Message- From:

[sqlite] Re: ATTACH and :memory: databases

2007-02-07 Thread Igor Tandetnik
Dave Gierok <[EMAIL PROTECTED]> wrote: I would like to attach a :memory: database to another :memory: database. How is this possible As far as I can tell, this is not possible. Why would you want to? What are you trying to achieve? Igor Tandetnik

Re: Re[2]: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Guillaume Fougnies
Wed, Feb 07, 2007 at 07:36:10PM +0200: DragonK wrote: > On 2/7/07, Teg <[EMAIL PROTECTED]> wrote: > > > >Hello ohadp, > > > >Well, my experience is, particularly when it's users using it and not > >a personal project, that corruption happens fairly frequently when you > >use this pragma. That's

Re: [sqlite] ATTACH and :memory: databases

2007-02-07 Thread Dan Kennedy
On Wed, 2007-02-07 at 09:37 -0800, Dave Gierok wrote: > I would like to attach a :memory: database to another :memory: database. How > is this possible since the ATTACH command requires the database's file name? > > ATTACH [DATABASE] database-filename AS database-name > > -Dave Gierok I don't

RE: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Rob Richardson
I can't get SQLiteExplorer to work with my databases. It always gives me an "unknown file format" error. I believe it's been quite a while since it was updated. RobR -Original Message- From: Griggs, Donald [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 3:14 PM To:

[sqlite] Re: Busy timeout and prepare statements

2007-02-07 Thread Igor Tandetnik
McDermott, Andrew <[EMAIL PROTECTED]> wrote: I'm seeking some clarification regarding set_busy_timeout(). If I set this to some positive value does this work when using prepared statements (prepare, step, reset) or only when using sqlite3_exec(). Busy timeout does apply to sqlite3_step

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Thanks for that. I am not familiar with compiling C code and haven't compiled SQLite yet. Could you send me your dll so I could try that? Database seems fine to me as well, but I definitely have trouble with only that particular table. RBS -Original Message- From: Guy Hachlili

Re: Re[2]: [sqlite] how can i speed up inserts ?

2007-02-07 Thread DragonK
On 2/7/07, Ken <[EMAIL PROTECTED]> wrote: Try without the pragma and wrap the inserts with a begin transaction and a commit... The performance will be almost as good as with the pragma, with the added benefit of consistent data and no corruption in the event of a crash or power failure. I

Re: Re[2]: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Ken
Try without the pragma and wrap the inserts with a begin transaction and a commit... The performance will be almost as good as with the pragma, with the added benefit of consistent data and no corruption in the event of a crash or power failure. DragonK <[EMAIL PROTECTED]> wrote:

[sqlite] Busy timeout and prepare statements

2007-02-07 Thread McDermott, Andrew
Hi, I'm seeking some clarification regarding set_busy_timeout(). If I set this to some positive value does this work when using prepared statements (prepare, step, reset) or only when using sqlite3_exec(). Thanks.

[sqlite] ATTACH and :memory: databases

2007-02-07 Thread Dave Gierok
I would like to attach a :memory: database to another :memory: database. How is this possible since the ATTACH command requires the database's file name? ATTACH [DATABASE] database-filename AS database-name -Dave Gierok

Re: Re[2]: [sqlite] how can i speed up inserts ?

2007-02-07 Thread DragonK
On 2/7/07, Teg <[EMAIL PROTECTED]> wrote: Hello ohadp, Well, my experience is, particularly when it's users using it and not a personal project, that corruption happens fairly frequently when you use this pragma. That's why I don't use it any more in my production code. Transactions are far

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread COS
Hi Rob, You can try DBManager Standard or Enterprise Editions. The first one is free for personal use, the second is a commercial product. The complete list of features can be found at http://www.dbtools.com.br/EN/dbmanagerpro. You can edit your tables data and also manipulate images in blob

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread Guy Hachlili
At 17:04 2/7/2007 +, you wrote: Not sure now the zip file has come through to this forum. I can see it, but I also got a message that it wasn't allowed. Didn't get through the first time, did get through the second time. I tried my version of the VBSqlite3 DLL and it works, although I

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Michael Schlenker
Dennis Cote schrieb: ohadp wrote: holy smokes that pragma just made my several hundred inserts take half a second compared to 30 seconds earlier. thanks! Yes, but now your database can be corrupted by a power failure or OS crash. Wrapping several hundred inserts in a transaction will be

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Gerry Snyder
ohadp wrote: luckily this isn't mission critical failure, i'll take the risk that one out of ten thousand users experiences database corruption. Only you can judge how important your data are. i can only batch the inserts into maybe 4-5 a time, don't know how much of an improvement that will

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Not sure now the zip file has come through to this forum. I can see it, but I also got a message that it wasn't allowed. RBS -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 16:19 To: sqlite-users@sqlite.org Subject: RE: [sqlite] Still Excel crash

Re[2]: [sqlite] how can i speed up inserts ?

2007-02-07 Thread Teg
Hello ohadp, Well, my experience is, particularly when it's users using it and not a personal project, that corruption happens fairly frequently when you use this pragma. That's why I don't use it any more in my production code. Transactions are far safer and fast too. C Wednesday, February 7,

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread John Stanton
Try it. You might find that it executes in a similar time and it will still be ACID and safe. ohadp wrote: luckily this isn't mission critical failure, i'll take the risk that one out of ten thousand users experiences database corruption. i can only batch the inserts into maybe 4-5 a time,

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread ohadp
luckily this isn't mission critical failure, i'll take the risk that one out of ten thousand users experiences database corruption. i can only batch the inserts into maybe 4-5 a time, don't know how much of an improvement that will be... Dennis Cote wrote: > > ohadp wrote: >> holy smokes that

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Ah, now after closing Excel and reopening it and doing the select again on that same table it now does crash Excel. This is the same table I sent in the zipped db. RBS -Original Message- From: Guy Hachlili [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 15:40 To:

RE: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Wasn't sure if it was allowed to post attachments to this forum. I will see if I can reproduce this and send the zipped db to here. RBS -Original Message- From: Guy Hachlili [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 15:40 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Still

Re: [sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread Guy Hachlili
Hmmm... At 13:38 2/7/2007 +, you wrote: Still having a problem when selecting data from one particular table with the VB wrapper dll SQLite3VB.dll. It is only a small table and I just can't see why there would be a problem. Would anybody be willing to have a look at this table? The zipped

RE: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Robert Simpson
> -Original Message- > From: Robert Simpson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 07, 2007 8:25 AM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Is there a SQLiteSpy-like thing that will let me > change data from a grid? > > __declspec(dllexport) int WINAPI

RE: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Robert Simpson
For the SQLite ADO.NET wrapper, I actually wrote two functions into the core engine to help me retrieve key information. My requirements were a little more complex than just getting rowid, but here's what I did to get me that far at least: Given a sqlite_stmt pointer consisting of a SELECT on

Re: [sqlite] Select and deletion

2007-02-07 Thread DragonK
On 2/7/07, anis chaaba <[EMAIL PROTECTED]> wrote: with which language are you trying to do this? to execute the delete statement you can use transactions to ensure atomicity. regards, I'm using a C++ wrapper over sqlite. The code i'm running is the following: SQLiteWrapper w;

[sqlite] Still Excel crash when running sqlite_get_table

2007-02-07 Thread RB Smissaert
Still having a problem when selecting data from one particular table with the VB wrapper dll SQLite3VB.dll. It is only a small table and I just can't see why there would be a problem. Would anybody be willing to have a look at this table? The zipped database file is only 15 Kb. Thanks. RBS

Re: [sqlite] Select and deletion

2007-02-07 Thread Jay Sprenkle
On 2/7/07, DragonK <[EMAIL PROTECTED]> wrote: Hello everybody, I'm wondering if the following scenario would work properly: Run a SELECT query on the database and in a loop retrieve each result; for each retrieved result, inside the same loop, execute a DELETE statement for the previously

Re: [sqlite] Select and deletion

2007-02-07 Thread anis chaaba
with which language are you trying to do this? to execute the delete statement you can use transactions to ensure atomicity. regards,

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread ohadp
holy smokes that pragma just made my several hundred inserts take half a second compared to 30 seconds earlier. thanks! DragonK wrote: > > On 2/7/07, Ohad Eder-Pressman <[EMAIL PROTECTED]> wrote: >> >> i've got sqlite compiled with visual-studio, with all the default >> options, >> didn't

Re: [sqlite] how can i speed up inserts ?

2007-02-07 Thread DragonK
On 2/7/07, Ohad Eder-Pressman <[EMAIL PROTECTED]> wrote: i've got sqlite compiled with visual-studio, with all the default options, didn't touch anything. inserts are just a bit too slow for me, is there a good way to speed this up using some flags ? any other flags that it would be smart to

[sqlite] how can i speed up inserts ?

2007-02-07 Thread Ohad Eder-Pressman
i've got sqlite compiled with visual-studio, with all the default options, didn't touch anything. inserts are just a bit too slow for me, is there a good way to speed this up using some flags ? any other flags that it would be smart to turn on for some better performance ? thanks

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Ralf Junker
>> The SQLite library lacks certain API required to implement cell >> editing: Most notably, there is no functionality to retrieve >> the exact origin (table, row and column) of a cell, which must >> be known to store back the modified value. > >See: > >

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread drh
Ralf Junker <[EMAIL PROTECTED]> wrote: > > The SQLite library lacks certain API required to implement cell > editing: Most notably, there is no functionality to retrieve > the exact origin (table, row and column) of a cell, which must > be known to store back the modified value. See:

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Ralf Junker
Hello Rob Richardson, >The only tool I have for examining and manipulating SQLite databases is >SQLiteSpy. If I want to change data in that program, I have to write an >SQL statement. Every other database editor I've seen lets a use do >simple things from a grid. As the author of SQLiteSpy: