[sqlite] sqlite3_finalize(transaction_stmt) nonsense ?

2010-01-28 Thread Joost
Hm - yes, i thought so too and was very astonished identifying those lines as the supposed cause of crashing. But without them everything seems to work well, there is no segfault at ending the test script too (as there is with errors at Python's reference counts). Then something else must be

Re: [sqlite] sqlite3_finalize(transaction_stmt) nonsense ?

2010-01-28 Thread Dan Kennedy
On Jan 29, 2010, at 1:17 PM, Joost wrote: > Hi all, > > at first i want to say a big "Thank you" to all sqlite developers. > Using > sqlite with Python since 4 years i always (when suited) announce > sqlite > in my examples for great open source software - indeed i see it as > one > of

[sqlite] sqlite3_finalize(transaction_stmt) nonsense ?

2010-01-28 Thread Joost
Hi all, at first i want to say a big "Thank you" to all sqlite developers. Using sqlite with Python since 4 years i always (when suited) announce sqlite in my examples for great open source software - indeed i see it as one of the best pieces of software in the world. The same can be said for

Re: [sqlite] SQlite query performs 10 times slower than MS Access query

2010-01-28 Thread Jean-Christophe Deschamps
>The execution time of the first time I run my query varies wildly, I >dunno why. Probably due to an empty or dirty cache. That's fairly common with cache inclined applications, subsystems or OSes. The second time, most of what's needed is found in cache with much less variability.

Re: [sqlite] SQlite query performs 10 times slower than MS Access query

2010-01-28 Thread Doyel5
Hi Everybody, Thanks a lot for the suggestions. I really appreciate your help. :-) Just wanted to share my results.. I deleted all indexes, kept only the indexes on the temporary tables, namely - tempSimArgs and tempPartArgs, and seemingly my original query's running time decreased to around 1

Re: [sqlite] Problem using sqlite in a C++/CLI .Net application

2010-01-28 Thread Edward Diener
Sylvain Pointeau wrote: > Hi again, > > as far as I know you cannot compile SQLite for C++/CLI directly, and I > recently have some problem using C++/CLI in my Qt project. In C++/CLI one can have both .Net classes and standard C++ classes, since C++/CLI classes have a different syntax than

Re: [sqlite] what are the limitations for IN() lists?

2010-01-28 Thread Simon Slavin
On 28 Jan 2010, at 4:07pm, Tim Romano wrote: > Rather than make a dozen or a hundred round-trips to the webserver, > passing one or a few zipcodes at a time, because that would have > significant latency through the cloud, I am passing the entire list of > desired zip-codes, and getting a

Re: [sqlite] SQLite Question: Is there a SQLite function that can "copy" one database to another (programmatically)?

2010-01-28 Thread Pavel Ivanov
Apparently you're writing to the sqlite-users mailing list but don't read all answers that people give writing to the same mailing list - people usually do not reply to you directly and I'd appreciate if you didn't reply to me directly too. Write to the list and read from the list. Pavel On Thu,

Re: [sqlite] SQLite Question: Is there a SQLite function that can "copy" one database to another (programmatically)?

2010-01-28 Thread Pavel Ivanov
What's wrong with the link already given you in another thread? http://www.sqlite.org/backup.html Also see http://www.sqlite.org/c3ref/backup_finish.html. Pavel On Thu, Jan 28, 2010 at 9:43 AM, Trapper Schuler wrote: > Hello, > > Is there a SQLite function that

Re: [sqlite] what are the limitations for IN() lists?

2010-01-28 Thread Dan Kennedy
On Jan 28, 2010, at 10:26 PM, Tim Romano wrote: > Thanks for this clarification. > > Wouldn't SQLite simply rewrite my IN-list query, transparently, as an > equijoin against a transient table that has been populated with the > values in the IN-list? I don't understand why the IN-list should

[sqlite] SQLite Question: Is there a SQLite function that can "copy" one database to another (programmatically)?

2010-01-28 Thread Trapper Schuler
Hello, Is there a SQLite function that can "copy" one database to another (programmatically)? I would imagine that there would be a function that could take a "From" handle and a "To" handle that could copy an entire database. A "duplicate" function should work for me as well if there is no

Re: [sqlite] SQLite Question: What is the best way to "buffer" the database in memory while still being able to save the database to disk when needed (programmatically)?

2010-01-28 Thread Kees Nuyt
On Wed, 27 Jan 2010 23:20:01 -0500, Trapper Schuler wrote: >Hello, > >I am new to SQLite, but have experience with other database management >systems. Performance is very critical in my application, but the data >is getting too large to keep in memory. My

Re: [sqlite] what are the limitations for IN() lists?

2010-01-28 Thread Tim Romano
The front-end could be any client that can issue a RESTful request and POST parameters to the server. Mine happens to be written in Adobe FlashBuilder ( née FlexBuilder). I wrote the webservice in ASP.NET using Robert Simpson's System.Data.SQLite ADO.NET provider against SQLite3. The main

Re: [sqlite] what are the limitations for IN() lists?

2010-01-28 Thread Jay A. Kreibich
On Thu, Jan 28, 2010 at 10:26:45AM -0500, Tim Romano scratched on the wall: > Thanks for this clarification. > > Wouldn't SQLite simply rewrite my IN-list query, transparently, as an > equijoin against a transient table that has been populated with the > values in the IN-list? I don't

Re: [sqlite] what are the limitations for IN() lists?

2010-01-28 Thread Pavel Ivanov
SQLite doesn't have this type of optimization. Internally IN-list will be converted by SQLite parser to sequence of equality checks that will be performed on each row. So generally the more the IN-list the worse the performance of the query. So with IN-list growing to 100 or more elements I'd say

Re: [sqlite] what are the limitations for IN() lists?

2010-01-28 Thread Tim Romano
Thanks for this clarification. Wouldn't SQLite simply rewrite my IN-list query, transparently, as an equijoin against a transient table that has been populated with the values in the IN-list? I don't understand why the IN-list should have to be avoided. Thanks Tim Romano On 1/27/2010

Re: [sqlite] SQLite Question: What is the best way to "buffer" the database in memory while still being able to save the database to disk when needed (programmatically)?

2010-01-28 Thread Igor Tandetnik
Trapper Schuler wrote: > If I use a "Temporary Database" or an "In-Memory Database", is there an > easy way to take that database and write it to disk http://www.sqlite.org/backup.html Igor Tandetnik ___ sqlite-users mailing list

Re: [sqlite] sqllite and sub queries

2010-01-28 Thread P Kishor
On Thu, Jan 28, 2010 at 12:51 AM, Hans Hilzinger wrote: > > > Folks > > I am considering porting one or more public web sites I > have running sql express databases to sqllite. This has been prompted due > to the inability of my service provider to sufficiently support this

Re: [sqlite] Concurrency support for multiple process

2010-01-28 Thread Max Vlasov
> I expect process B able to > read the old data and displays appropriately. But, process B seems to be > blocked. Why is this so as I thought SQLite handle concurrency as in this > case where there are multiple reads and one single write ? > After Pavel's explanation just reread

Re: [sqlite] SQLite Question: What is the best way to "buffer" the database in memory while still being able to save the database to disk when needed (programmatically)?

2010-01-28 Thread Pavel Ivanov
I can't see all your requirements for this database but I believe you'd better not use temporary or in-memory databases. You'd better use regular database but use all kinds of tricks to speed up work with it (like "pragma synchronous off", "pragma journal_mode off", in some cases some tricks can

Re: [sqlite] sqllite and sub queries

2010-01-28 Thread Pavel Ivanov
Your query looks perfectly correct. You say that it returns 0 in count(*) sub-selects and you think that it's not correct? Could you show as your schema creation statements? And check that your StatusId really contains integers, not text. Also check that BlogPostId in BlogComment and BlogPost has

Re: [sqlite] Concurrency support for multiple process

2010-01-28 Thread Pavel Ivanov
It's not clear what locks did you want to show with your diagram but in reality locks would be held as following: *Process A*: Begin Transaction - no lock *Process B*: Select DB1 <-- shared lock *Process A*: Insert DB1 <-- if insert is small then only reserved lock *Process B*: Select DB1 <--

Re: [sqlite] Concurrency support for multiple process

2010-01-28 Thread nyetngoh wong
Hi, Is the locking states shown below for DB1 correct ? *Process A* *Process B* Begin Transaction Insert DB1<-- Reserved lock Select DB1<-- Shared lock Insert DB1 : after 10 Inserts and 10 Selects Select DB1<-- Shared lock : Continue Inserts

Re: [sqlite] Concurrency support for multiple process

2010-01-28 Thread Max Vlasov
> > > SQLite allows multiple readers OR a single writer to access the database > simultaneously. > From the SQLite doc, as long as no transaction is pending, other process > can > read or obtain reserved lock for write. > the docs say: "Locks are not acquired until the first read or write

[sqlite] sqllite and sub queries

2010-01-28 Thread Hans Hilzinger
Folks I am considering porting one or more public web sites I have running sql express databases to sqllite. This has been prompted due to the inability of my service provider to sufficiently support this kind of hosting. I have done a number of tests including conversion of our aspnet

[sqlite] SQLite Question: What is the best way to "buffer" the database in memory while still being able to save the database to disk when needed (programmatically)?

2010-01-28 Thread Trapper Schuler
Hello, I am new to SQLite, but have experience with other database management systems. Performance is very critical in my application, but the data is getting too large to keep in memory. My application is not just a database front end. The database is just a part of the overall

Re: [sqlite] Problem using sqlite in a C++/CLI .Net application

2010-01-28 Thread Sylvain Pointeau
Hi again, as far as I know you cannot compile SQLite for C++/CLI directly, and I recently have some problem using C++/CLI in my Qt project. What I did was to let my application in C++ then compile some part in C++/CLI, there is some way to mix the managed and unmanaged code. I think you want to

Re: [sqlite] Problem using sqlite in a C++/CLI .Net application

2010-01-28 Thread Sylvain Pointeau
Hi, you can look at System.Data.SQLite and look at the sources. Best regards, Sylvain On Thu, Jan 28, 2010 at 12:23 AM, Edward Diener < eldlistmaili...@tropicsoft.com> wrote: > I am able to compile a C++/CLI .Net application using sqlite. But when > it links it