Re: [sqlite] Bad UPDATE performance

2009-05-12 Thread Dan
On May 13, 2009, at 3:15 AM, Ofir Neuman wrote: > Hi, > > Using version 3.6.10.0. > > I have a problem that my application becomes slow after awhile with no > specific reasonI got a chance to reproduce it on development > environment and > have noticed that UPDATE of 200 records within

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread John Stanton
Joanne Pham wrote: > Hi, > Thanks for information! > Regarding "batch" insert why we need to put the column binding > (sqlite3_bind...) before running sqlite3_step. For example: > sqlite_prepare_v2 > begin transaction > loop thru all the changes > sqlite3_bind >

Re: [sqlite] Bad UPDATE performance

2009-05-12 Thread Pavel Ivanov
Just a couple of questions that can clarify situation: Do you work with pragma synchronous = FULL? Does the behavior of the journal you have described remains if you change pragma journal_mode = PERSIST? Pavel On Tue, May 12, 2009 at 4:15 PM, Ofir Neuman wrote: > Hi, > >

Re: [sqlite] Program is crashed on sqlite3_free

2009-05-12 Thread Pavel Ivanov
Double call to sqlite3_finalize() ? Pavel On Tue, May 12, 2009 at 5:22 PM, Joanne Pham wrote: > Hi all, > I have the application and occasionally it is crashed on sqlite3_free when it > callled sqlite3_finalized and I really didn't know what problem it was. > Below is

[sqlite] help,low RAM problem

2009-05-12 Thread 徐中华
hi, I have a project based on an embedded platform. the platform just has 30K RAM and a large NAND Flash, so I want to use SQLite on this platform. Can SQLite 3.6 be used on this platform . And if it 's possible, how can I configure the SQlite ? Thanks.

Re: [sqlite] Prepared statements must be generated insideyourtransaction

2009-05-12 Thread Igor Tandetnik
Joanne Pham wrote: > I am talking about "Insert". For Micorosft SQL server I don't need to > "binding parameters " inside the loop. > Only bind the first time(outside the loop) and inside the loop I just > copied the new data to the variable(structure) that binded outside >

Re: [sqlite] Prepared statements must be generated inside yourtransaction

2009-05-12 Thread Igor Tandetnik
Joanne Pham wrote: > Regarding "batch" insert why we need to put the column binding > (sqlite3_bind...) before running sqlite3_step. For example: > sqlite_prepare_v2 > begin transaction > loop thru all the changes > sqlite3_bind > sqlite3_step. > end loop > end

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Joanne Pham
Hi, Thanks for information! Regarding "batch" insert why we need to put the column binding (sqlite3_bind...) before running sqlite3_step. For example:  sqlite_prepare_v2  begin transaction     loop thru all the changes             sqlite3_bind             sqlite3_step.     end loop end

Re: [sqlite] how do I use more than one column as a "combined key"?

2009-05-12 Thread Igor Tandetnik
yaconsult wrote: >User Accounts > name > uid > server > login > . > . > . > >Calendar Accounts > server > login > firstname > lastname > . > . > . > > > What I need to be able to do is to check > that the server and login information > in the first table matches one

[sqlite] Program is crashed on sqlite3_free

2009-05-12 Thread Joanne Pham
Hi all, I have the application and occasionally it is crashed on sqlite3_free when it callled sqlite3_finalized and I really didn't know what problem it was. Below is stack trace. Do you have any idea what is caused this problem.? Any hints will be greatly appreciated. #0  0xb5d90c31 in

Re: [sqlite] how do I use more than one column as a "combined key"?

2009-05-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 yaconsult wrote: > What I need to be able to do is to check > that the server and login information > in the first table matches one and only > one of the accounts in the second table. > > What I'm having trouble figuring out is > how to use the

[sqlite] how do I use more than one column as a "combined key"?

2009-05-12 Thread yaconsult
SQL newbie here. Sqlite has been a fantastic tool for analyzing, comparing and correcting lots of account information. But I've hit a roadblock because I don't know how to treat multiple columns as a kind of combined key. I need to know how to relate two tables on multiple columns. It's been

[sqlite] Bad UPDATE performance

2009-05-12 Thread Ofir Neuman
Hi, Using version 3.6.10.0. I have a problem that my application becomes slow after awhile with no specific reasonI got a chance to reproduce it on development environment and have noticed that UPDATE of 200 records within transaction takes more than 20 sec. When the application first run

[sqlite] Bad UPDATE performance

2009-05-12 Thread Ofir Neuman
Hi, Using version 3.6.10.0. I have a problem that my application becomes slow after awhile with no specific reasonI got a chance to reproduce it on development environment and have noticed that UPDATE of 200 records within transaction takes more than 20 sec. When the application first run the

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread John Stanton
The confusion is in the names. When you "PREPARE" a statement you actually compile the SQL. Compiling a program each time you run it is a waste of resources, and so is compiling the SQL each time you use it. Prepare your statements once and use them many times, binding data to the compiled

Re: [sqlite] Prepared statements must be generated inside yourtransaction

2009-05-12 Thread Igor Tandetnik
Joanne Pham wrote: > Thanks for quick responde my email > This is sqlite documentation. Below is the link and last paragraph in > this document has stated that. > > http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning Wiki is not really "official" documentation: anybody

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Pavel Ivanov
I think last-last paragraph answers your question and proves incorrectness of previous paragraph: "I've used this technique and it seems to work just fine. I had to remember to reset() the prepared statements immediately after I used them, however." :) Pavel On Tue, May 12, 2009 at 12:48 PM,

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Joanne Pham
Thanks for quick responde my email This is sqlite documentation. Below is the link and last paragraph in this document has stated that. http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning From: Pavel Ivanov To: General Discussion of

Re: [sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Pavel Ivanov
I believe, these matters are very specific for each database server (though I can't recall server for which it's true what you say). What specific server is talked about in this book? What's the name of this book? As long as SQLite is a concern, I prepare statements outside of transaction and

[sqlite] Prepared statements must be generated inside your transaction

2009-05-12 Thread Joanne Pham
Hi All, I have read one of the performance document and it stated that "prepared statements must be generated inside transaction". Is that correct. The document also stated that " While trying to improve the performance of bulk imports in our C++ project, we found that creating the prepared

Re: [sqlite] memory usage and queries

2009-05-12 Thread Christopher Taylor
I fixed this by reducing the cache size from 2000 to 200. I may want to adjust some more but will continue to test. Chris ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Trusted file system (Atomic write sector)

2009-05-12 Thread SuperCommit
Hi, Generally, I'm wondering what is the best SQLite settings on Trusted file system. And more specifically what is the "ACID" behavior to set the PRAGMA synchronous = OFF Cheers -- View this message in context:

[sqlite] memory usage and queries

2009-05-12 Thread Christopher Taylor
I am running into issues where I am running out of memory on my embedded app. I have stored 10K records in a table. There is an index on a key field and a sort field. An external program needs to reconcile its data with the data in this table. It does so 200 records at a time. The code I am