Re: [sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 D. Richard Hipp wrote: > There are multiple reasons for changing from CVS to Fossil. The reasons listed are true for pretty much any of the current popular distributed source control systems. They have various minor under the hood differences (eg if

Re: [sqlite] One more SQL statement question

2009-09-09 Thread Dennis Volodomanov
> The not-in subselect could be expensive, depending on table size. If > it turns out to be expensive, you might consider reference counting. Thank you for the hint. It's done on an integer column with an index, so hopefully won't be too bad. Further tests will show though of course. Dennis

Re: [sqlite] One more SQL statement question

2009-09-09 Thread Jim Showalter
The not-in subselect could be expensive, depending on table size. If it turns out to be expensive, you might consider reference counting. - Original Message - From: "Dennis Volodomanov" To: "General Discussion of SQLite Database" Sent:

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Iker Arizmendi
Simon Slavin wrote: > On 10 Sep 2009, at 12:02am, Iker Arizmendi wrote: > >> The assumption being that a lock facility that can handle these issues >> is needed by any concurrency scheme (MVCC, shadow pages, etc) and so >> can >> be thought about independently. Does the ability of a

Re: [sqlite] One more SQL statement question

2009-09-09 Thread Dennis Volodomanov
> sqlite> create trigger UpdateData after update on tablea begin >...> delete from tableb where id=old.refb and id not in ( select > refb from tablea ); Yep, that's exactly what I need. Thank you! Dennis ___ sqlite-users mailing list

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Iker Arizmendi
Cory Nelson wrote: > > Right now sqlite works over a network via NFS and the like -- if you > wanted to keep it an embedded library (with no server), you'd have to > drop support for that. > > PS. please stop top posting! > > It looks like any move away from file based locks suffers from this

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Simon Slavin
On 10 Sep 2009, at 12:02am, Iker Arizmendi wrote: > The assumption being that a lock facility that can handle these issues > is needed by any concurrency scheme (MVCC, shadow pages, etc) and so > can > be thought about independently. Does the ability of a client-server > DB to > support

Re: [sqlite] One more SQL statement question

2009-09-09 Thread Simon Davies
2009/9/10 Dennis Volodomanov : > Hello, > > I have one more SQL query question - the people on this list have been very > helpful in the past, so thank you! > > I'm trying to create a trigger that would delete unreferenced rows from a > table. > > Let's say the schema is

Re: [sqlite] One more SQL statement question

2009-09-09 Thread Dennis Volodomanov
> This statement makes no sense to me. Why not simply > > delete from TABLEB where ID=old.REFB and ID != new.REFB; But entries in TABLEB may be used by other entries in TABLEA and I don't want them deleted if they're used by at least one entry in TABLEA. Thanks, Dennis

Re: [sqlite] How long should Insert take?

2009-09-09 Thread Rod Dav4is
Well, That certainly did the trick. Much obliged! Rate now > 2000 inserts/second including transaction processing and 3390 inserts. -R. Igor Tandetnik wrote: > Rod Dav4is wrote: > >> *Insert rate*: 7/sec. >> > > Run batches of inserts within a single transaction. It's

Re: [sqlite] One more SQL statement question

2009-09-09 Thread Igor Tandetnik
Dennis Volodomanov wrote: > I'm trying to create a trigger that would delete unreferenced rows > from a table. > > Let's say the schema is like this: > > TABLEA ( ID INTEGER PRIMARY KEY, REFB INTEGER ); > TABLEB ( ID INTEGER PRIMARY KEY, DATA ); > > And let's say the data is

Re: [sqlite] How long should Insert take?

2009-09-09 Thread Rod Dav4is
Thanks. I'll give it a try. Igor Tandetnik wrote: > Rod Dav4is wrote: > >> *Insert rate*: 7/sec. >> > > Run batches of inserts within a single transaction. It's not the insert > itself that's slow, it's the process of committing a transaction. By not > starting an

Re: [sqlite] I'm surprised what the author of web2py on web2py mailing list just said about sqlite

2009-09-09 Thread Dave Toll
> >I apologize and I conclude my statement is not correct. > >I have experienced this problem once (out of disk space and sqlite >database corruption) but I made the mistake of confusing correlation >with causality. Except in that occasion I never had any problem with >sqlite and I do use it on

[sqlite] One more SQL statement question

2009-09-09 Thread Dennis Volodomanov
Hello, I have one more SQL query question - the people on this list have been very helpful in the past, so thank you! I'm trying to create a trigger that would delete unreferenced rows from a table. Let's say the schema is like this: TABLEA ( ID INTEGER PRIMARY KEY, REFB INTEGER ); TABLEB (

Re: [sqlite] How long should Insert take?

2009-09-09 Thread Jay A. Kreibich
On Wed, Sep 09, 2009 at 06:59:18PM -0400, Rod Dav4is scratched on the wall: > *Insert rate*: 7/sec. http://www.sqlite.org/faq.html#q19 -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and

Re: [sqlite] How long should Insert take?

2009-09-09 Thread Griggs, Donald
Hi Rod, Regarding: *Insert rate*: 7/sec. You'll want to wrap your INSERT loop in a transaction, i.e., BEGIN / COMMIT. Without a transaction, each INSERT has to wait for multiple disk revolutions. http://www.sqlite.org/lang_transaction.html If you have a huge number of inserts, you may want to

Re: [sqlite] How long should Insert take?

2009-09-09 Thread Igor Tandetnik
Rod Dav4is wrote: > *Insert rate*: 7/sec. Run batches of inserts within a single transaction. It's not the insert itself that's slow, it's the process of committing a transaction. By not starting an explicit transaction, you commit an implict one on every statement. Igor

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Iker Arizmendi
I'm not planning to develop a new SQL engine, nor am I proposing any changes to SQLite. I'm only looking for some pointers regarding the relevant issues in order to study them more closely. If something useful were to come as a result of doing so then I might be in a position to actually flesh out

[sqlite] How long should Insert take?

2009-09-09 Thread Rod Dav4is
The environment: Compaq Presario CQ60 w/Pentium dual core 2GHz+2GHz, 2GB RAM Windows Vista Home Premium w/SP2, fully updated & patched SQLite/3 (3.6.17) My db 17.5Mb (small-medium size, I would say) The table: CREATE TABLE INDI (ref text , indi text) No indices or

Re: [sqlite] I'm surprised what the author of web2py on web2py mailing list just said about sqlite

2009-09-09 Thread Stef Mientki
the answer of Massimo (the web2py author): I apologize and I conclude my statement is not correct. I have experienced this problem once (out of disk space and sqlite database corruption) but I made the mistake of confusing correlation with causality. Except in that occasion I never had any

Re: [sqlite] I'm surprised what the author of web2py on web2py mailing list just said about sqlite

2009-09-09 Thread Stef Mientki
D. Richard Hipp wrote: > On Sep 9, 2009, at 5:35 PM, Stef Mientki wrote: > >> >> The worse thing about sqlite is that if the file grows and you run out >> of memory, the file gets corrupted and you lose data. >> >> > > The web2py author seems to be misinformed. Perhaps you could

Re: [sqlite] I'm surprised what the author of web2py on web2py mailing list just said about sqlite

2009-09-09 Thread D. Richard Hipp
On Sep 9, 2009, at 5:35 PM, Stef Mientki wrote: > > > The worse thing about sqlite is that if the file grows and you run out > of memory, the file gets corrupted and you lose data. > The web2py author seems to be misinformed. Perhaps you could direct him to the description of SQLite's

[sqlite] I'm surprised what the author of web2py on web2py mailing list just said about sqlite

2009-09-09 Thread Stef Mientki
The worse thing about sqlite is that if the file grows and you run out of memory, the file gets corrupted and you lose data. cheers, Stef ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Simon Slavin
On 9 Sep 2009, at 9:09pm, Iker Arizmendi wrote: > I'm hopeful that it's possible to devise a scheme that will let > SQLite support > multiple readers and writers while completely preserving all of its > current > benefits (eg, serverless, efficient, zero-conf, simple API, small >

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Cory Nelson
On Wed, Sep 9, 2009 at 1:09 PM, Iker Arizmendi wrote: > I'm hopeful that it's possible to devise a scheme that will let SQLite support > multiple readers and writers while completely preserving all of its current > benefits (eg, serverless, efficient, zero-conf, simple API,

Re: [sqlite] sqlite3_exec fails on arm

2009-09-09 Thread Shane Harrelson
I wasn't able to duplicate this with my ARM system. Can you provide more details? or was the issue DRH pointed out above your problem? On Wed, Sep 9, 2009 at 7:02 AM, gprand wrote: > > Hi, > > I can confirm this behavoir. Now, after 2 days debugging and unsuccessful > searching

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Pavel Ivanov
> I'm hopeful that it's possible to devise a scheme that will let SQLite support > multiple readers and writers while completely preserving all of its current > benefits So the answer to my question is yes, you want to develop a new SQL engine... Then first of all you have to describe one thing:

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Simon Slavin
On 9 Sep 2009, at 9:15pm, Stef Mientki wrote: > 1 type of car can (and will) be owned by many persons. Oh, so these are not specific cars, these are descriptions of cars. Yes, in this case you need now what is asked for in the subject-header "one to many" but "many to many". And the

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Stef Mientki
Shaun Seckman (Firaxis) wrote: > It seems like the more ideal solution would be to create a third table for > ownership that contains a person ID and a vehicle ID. thanks Shaun, but that's what I (i'm not a database expert) call the Bind table. I read some articles about normalization, and I

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Stef Mientki
Simon Slavin wrote: > On 9 Sep 2009, at 5:15pm, Stef Mientki wrote: > > >> The situation is like this (simplified): >> >> I've a table with persons: name, address, phone, etc. >> I've another table with vehicles: car_or_bike, brand, type, build- >> year, etc. >> The 2 tables are bounded by

Re: [sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread Pavel Ivanov
> So what are we missing. Can you suggest better ways of organizing the > documentation above? A bit of suggestion: it would be great if http://www.sqlite.org/doc_keyword_crossref.html was accessible from http://www.sqlite.org/docs.html as a link say after "FAQ" with a text like "All

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Iker Arizmendi
I'm hopeful that it's possible to devise a scheme that will let SQLite support multiple readers and writers while completely preserving all of its current benefits (eg, serverless, efficient, zero-conf, simple API, small footprint). To that end, I'm trying to understand some of the "sub problems"

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Simon Slavin
On 9 Sep 2009, at 6:58pm, Shaun Seckman (Firaxis) wrote: > It seems like the more ideal solution would be to create a third > table for ownership that contains a person ID and a vehicle ID. I thought that a third table was what you proposed in the first place. I was telling you you didn't

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Stef Mientki
Igor Tandetnik wrote: > Stef Mientki wrote: > >> I'm just an amateur struggling with databases, >> so forgive if I ask a question every database user should know. >> >> The situation is like this (simplified): >> >> I've a table with persons: name, address, phone, etc. >>

Re: [sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread D. Richard Hipp
On Sep 9, 2009, at 2:54 PM, Shaun Seckman (Firaxis) wrote: > I'm sold :) Do you know if there are any MS Visual Studio or MS > Explorer integrations? Nope. Sorry. We mostly use Linux and Mac here. Fossil does work on windows - it took quite a bit of effort to get the "fossil ui" and

Re: [sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread D. Richard Hipp
On Sep 9, 2009, at 1:46 PM, John Loveys wrote: > > I do find the documentation rather awkward. I have seen (and used) > links to > stuff I cannot find from the start page. Maybe doxygen? I write a > lot of C > and find it invaluable. > Suggestions on how to improve the documentation are

Re: [sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread Shaun Seckman (Firaxis)
I'm sold :) Do you know if there are any MS Visual Studio or MS Explorer integrations? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of D. Richard Hipp Sent: Wednesday, September 09, 2009 2:29 PM To: General Discussion of

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread P Kishor
On Wed, Sep 9, 2009 at 1:39 PM, Pavel Ivanov wrote: >> But I imagine >> there are other issues as well - these are the issues I'd like to get >> a bead on. > > I just keep wondering: do you want to write some new database engine > based on SQLite so that it will heed all these

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Pavel Ivanov
> But I imagine > there are other issues as well - these are the issues I'd like to get > a bead on. I just keep wondering: do you want to write some new database engine based on SQLite so that it will heed all these caveats? Otherwise this discussion is useless because all these features are not

Re: [sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread D. Richard Hipp
On Sep 9, 2009, at 2:04 PM, Shaun Seckman (Firaxis) wrote: > It's always a pleasure to have a new version of one of my favorite > tools. I noticed in the draft that you migrated the project to > Fossil. > I am curious, how was your experience with the migration? Did it go > smoothly or were

Re: [sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread Shaun Seckman (Firaxis)
It's always a pleasure to have a new version of one of my favorite tools. I noticed in the draft that you migrated the project to Fossil. I am curious, how was your experience with the migration? Did it go smoothly or were there many kinks to work out. Also, what was your primary motivation for

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Shaun Seckman (Firaxis)
It seems like the more ideal solution would be to create a third table for ownership that contains a person ID and a vehicle ID. This will result in more tables (significantly more if you're trying to migrate object oriented data into a relational model) but is that really a bad thing? I

Re: [sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread John Loveys
Thanks D Hipp Your software is marvelous, as is the help on this list. I had to rework one delete statement, for reasons I still don't get, but otherwise awfully good stuff. I made it work another way. I worked with some of the people who invented DB2. Was a hell of a lot of fun. I

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Igor Tandetnik
Stef Mientki wrote: > I'm just an amateur struggling with databases, > so forgive if I ask a question every database user should know. > > The situation is like this (simplified): > > I've a table with persons: name, address, phone, etc. > I've another table with vehicles:

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Iker Arizmendi
Proposals for techniques like MVCC and shadow paging have been made on this list before and they appeared feasible (IIUC) without a server process. The problems with the serverless approach arise once multiple writers are introduced. For example, efficiently detecting crashed writers and

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread P Kishor
On Wed, Sep 9, 2009 at 12:32 PM, Simon Slavin wrote: > > On 9 Sep 2009, at 5:15pm, Stef Mientki wrote: > >> The situation is like this (simplified): >> >> I've a table with persons: name, address, phone, etc. >> I've another table with vehicles: car_or_bike, brand,

Re: [sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Simon Slavin
On 9 Sep 2009, at 5:15pm, Stef Mientki wrote: > The situation is like this (simplified): > > I've a table with persons: name, address, phone, etc. > I've another table with vehicles: car_or_bike, brand, type, build- > year, etc. > The 2 tables are bounded by bind table: person_ID, vehicle_ID

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Ken
The key to increased concurrency is MVCC. Without MVCC concurrency is limited to page locking, table locking etc. Google MVCC... --- On Tue, 9/8/09, Iker Arizmendi wrote: > From: Iker Arizmendi > Subject: Re: [sqlite] server process gives better

[sqlite] how to get "One to many" in 1 row of a table ?

2009-09-09 Thread Stef Mientki
hello, I'm just an amateur struggling with databases, so forgive if I ask a question every database user should know. The situation is like this (simplified): I've a table with persons: name, address, phone, etc. I've another table with vehicles: car_or_bike, brand, type, build-year, etc.

[sqlite] SQLite version 3.6.18 scheduled for Monday

2009-09-09 Thread D . Richard Hipp
We are on schedule to release SQLite version 3.6.18 on Monday, 2009-09-14. For a preview, see http://www.sqlite.org/draft/index.html D. Richard Hipp d...@hwaci.com ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Column MetaData

2009-09-09 Thread Jay A. Kreibich
On Wed, Sep 09, 2009 at 07:33:31AM -0700, Sebastian Bermudez scratched on the wall: > ok. i'm develop... an PHP-WEB Sqlite TUNNEL Because apparently the world doesn't have enough wheels? >select * from tableA > > how can i to know the "base table name" of a column for make the

Re: [sqlite] Importing data into SQLite - text files are not really portable

2009-09-09 Thread P Kishor
On Wed, Sep 9, 2009 at 10:33 AM, Jim Showalter wrote: > Microsoft also supports an XML standard for import/export. Whenever > possible, it should be used instead of CSV. It's not the > line-terminators that are the problem--the problem is CSV itself. > That's why Microsoft

Re: [sqlite] Importing data into SQLite - text files are not really portable

2009-09-09 Thread Jim Showalter
Microsoft also supports an XML standard for import/export. Whenever possible, it should be used instead of CSV. It's not the line-terminators that are the problem--the problem is CSV itself. That's why Microsoft upgraded to supporting XML. They only support CSV for backward-compatibility

[sqlite] Column MetaData

2009-09-09 Thread Sebastian Bermudez
ok. i'm develop... an PHP-WEB Sqlite TUNNEL that PHP get a request, process it and send results to client (desktop app) In the client side, i have my Own Ado Like Data Access components my Question is: my cliente send a query "select * from tableA" the PHP exec the query and return an

[sqlite] ANN: AnySQL Maestro 9.8 released

2009-09-09 Thread SQL Maestro Group
Hi! SQL Maestro Group announces the release of AnySQL Maestro 9.8, a powerful tool for managing any database engine accessible via ODBC driver or OLE DB provider (SQLite, MySQL, SQL Server, Oracle, Access, etc). The new version is immediately available at

Re: [sqlite] Importing data into SQLite - text files are not really portable

2009-09-09 Thread Jean-Denis Muys
On 9/8/09 22:24 , various people wrote: > Unfortunately, the 3 main families of small computer operating systems > have 3 different definitions of what a text file is... > > DOS/Windows (PC): lines are terminated with CR+LF > Unix: lines are terminated with LF > Macintosh: lines are terminated

[sqlite] Your Opinions About This Article

2009-09-09 Thread Chris
A Toronto Globe and Mail columnist writes about Vacuum Places Improved (tested v1) for Firefox Free Windows/Mac/Linux Firefox profile cleaner by Luca Niccoli http://www.theglobeandmail.com/news/technology/the-everything-utility/article1279326/ Buried in the article he says: "The places

Re: [sqlite] server process gives better concurrency - why?

2009-09-09 Thread Iker Arizmendi
The benefits are the same as they would be for any application that wants to use SQLite instead of a traditional database: trivial install and configuration, simple administration, etc. Were SQLite to support higher concurrency then these benefits could be extended to a wider variety of

Re: [sqlite] Sqlite uses a lot of memory during a delete operation

2009-09-09 Thread P Kishor
On Tue, Sep 8, 2009 at 10:48 PM, Benjamin Rutt wrote: > On Mon, Sep 7, 2009 at 12:28 PM, P Kishor wrote: > >> Find out if the DELETEion is chewing up the memory or the SELECTion. Try >> >> SELECT * FROM old_conns WHERE "end" >= strftime('%s', 'now', '-7

Re: [sqlite] sqlite3_exec fails on arm

2009-09-09 Thread gprand
Hi, I can confirm this behavoir. Now, after 2 days debugging and unsuccessful searching around I have found your posting. It drives me crazy, but I can not locate the problem. Exactly the same code works, compiled for X86, and fails, compiled for ARM. All machine depending configuration is