Re: [sqlite] Re: Thread safety guarantees

2005-09-14 Thread Guillaume Fougnies
Wed, Sep 14, 2005 at 11:43:43PM +0200: Rolf Schaeuble wrote: > > > Dennis Jenkins wrote: > >Rolf Schaeuble wrote: > > > >>Hello, > >> > >>if I understand the whole issue correctly, there is only one reason > >>why it's not safe to use a sqlite handle in any thread of a process > >>(as long as

Re: [sqlite] Re: Thread safety guarantees

2005-09-14 Thread Robert Simpson
- Original Message - From: "Rolf Schaeuble" <[EMAIL PROTECTED]> To: Sent: Wednesday, September 14, 2005 2:43 PM Subject: Re: [sqlite] Re: Thread safety guarantees That doesn't work for me. During one single transaction several threads need to insert data into

Re: [sqlite] need to write during a long read

2005-09-14 Thread Mark Drago
On Thu, 2005-09-08 at 14:36 -0400, D. Richard Hipp wrote: > On Thu, 2005-09-08 at 10:48 -0400, Mark Drago wrote: > > However, it seems that for every rollback that I do there is a file left > > in the directory with the databases. I have 30-something files named > > like the following:

Re: [sqlite] Re: Thread safety guarantees

2005-09-14 Thread Rolf Schaeuble
Dennis Jenkins wrote: Rolf Schaeuble wrote: Hello, if I understand the whole issue correctly, there is only one reason why it's not safe to use a sqlite handle in any thread of a process (as long as only one thread at a time uses it): File locks are tied to the thread that created them

[sqlite] Re: Re: rowId continuity?

2005-09-14 Thread Igor Tandetnik
R S <[EMAIL PROTECTED]> wrote: I don't quite see why you need rowId to be contiguous to implement your paging. Can't you do something like this: select * from mytable where rowId > :lastRowId order by rowId limit 100 OK I do it this way, but my concern was are these rows refilled later? Also

Re: [sqlite] Re: rowId continuity?

2005-09-14 Thread Clark Christensen
--- R S <[EMAIL PROTECTED]> wrote: > > I don't quite see why you need rowId to be contiguous > to implement your > > paging. Can't you do something like this: > > > > select * from mytable > > where rowId > :lastRowId > > order by rowId > > limit 100 > > > > OK I do it this way, but my concern

Re: [sqlite] Re: rowId continuity?

2005-09-14 Thread R S
> I don't quite see why you need rowId to be contiguous to implement your > paging. Can't you do something like this: > > select * from mytable > where rowId > :lastRowId > order by rowId > limit 100 > > OK I do it this way, but my concern was are these rows refilled later? Also what happens if

Re: [sqlite] Porting...

2005-09-14 Thread D. Richard Hipp
On Wed, 2005-09-14 at 11:55 -0700, Jay Siegel wrote: > I turned on almost all of the OMIT definitions > since size is very important on my embedded platform. > This causes a few problems with definitions in > parse.c. This is documented somewhere and I expected > it. It shouldn't be necessary

Re: [sqlite] Re: Thread safety guarantees

2005-09-14 Thread Dennis Jenkins
Rolf Schaeuble wrote: Hello, if I understand the whole issue correctly, there is only one reason why it's not safe to use a sqlite handle in any thread of a process (as long as only one thread at a time uses it): File locks are tied to the thread that created them (except this special

Re: [sqlite] Porting...

2005-09-14 Thread Jay Sprenkle
On 9/14/05, Jay Siegel <[EMAIL PROTECTED]> wrote: > > The porting effort has now turned to a testing > effort... Don't forget there are a lot of regression test cases provided with the source. --- The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's Call

[sqlite] Porting...

2005-09-14 Thread Jay Siegel
I'm on my second day of porting SQLite to an embedded environment. I'm not sure if this is the appropriate place to put these comments about the experience. I've seen some type of "ticket" mechanism in CVS but I don't know if these comments raise to the level of a "bug", etc. Anyway, three

Re: [sqlite] rowId continuity?

2005-09-14 Thread Jay Sprenkle
Why not use another column? Provide sorted data for your users in some way that provides them with more value. On 9/14/05, R S <[EMAIL PROTECTED]> wrote: > > Hi, > I have a screen which displays rows of my table in a paged form (i.e. one > can do Back/Previous on them and navigate across

[sqlite] Re: rowId continuity?

2005-09-14 Thread Igor Tandetnik
R S wrote: I have a screen which displays rows of my table in a paged form (i.e. one can do Back/Previous on them and navigate across pages). I use the rowId of the top and bottom rows to query for the next/previous set of rows in the page. However I just read somewhere that the rowId need not

[sqlite] rowId continuity?

2005-09-14 Thread R S
Hi, I have a screen which displays rows of my table in a paged form (i.e. one can do Back/Previous on them and navigate across pages). I use the rowId of the top and bottom rows to query for the next/previous set of rows in the page. However I just read somewhere that the rowId need not be

[sqlite] Re: Thread safety guarantees

2005-09-14 Thread Rolf Schaeuble
Hello, if I understand the whole issue correctly, there is only one reason why it's not safe to use a sqlite handle in any thread of a process (as long as only one thread at a time uses it): File locks are tied to the thread that created them (except this special Redhat version). That's why

Re: [sqlite] Re: methods to improve insertion speed with SQLite

2005-09-14 Thread Martin Engelschalk
YES! Thank you very much, Igor. I overlooked that. Now my application runs a little bit faster (6%) Igor Tandetnik schrieb: Martin Engelschalk wrote: Also, i suspect that sqlite3_bind_text makes a copy of the text i pass, which could be eliminated too. Or am i wrong there? Only if you are

RE: [sqlite] Column Naming Convention (yet again)

2005-09-14 Thread Drew, Stephen
I've fixed this in my local copy, but sadly I am completely useless at CVS etcso here's what I did. Please let me know if anyone suspects this is dodgy or plain wrong. FILE: select.c, LINE: 1136 Changed: if( longNames ) To: if( longNames || pTabList->nSrc>1 ){ Many thanks, Steve

[sqlite] Re: methods to improve insertion speed with SQLite

2005-09-14 Thread Igor Tandetnik
Martin Engelschalk wrote: Also, i suspect that sqlite3_bind_text makes a copy of the text i pass, which could be eliminated too. Or am i wrong there? Only if you are using SQLITE_TRANSIENT flag, if I understand correctly. Use SQLITE_STATIC or an actual destructor callback. Igor Tandetnik

Re: [sqlite] methods to improve insertion speed with SQLite

2005-09-14 Thread Martin Engelschalk
Hello Thomas, you are right in principle: The gain should be not too great. However, the number of calls to sqlite3_bind_text is * of columns>, which is *very* high. Also, i suspect that sqlite3_bind_text makes a copy of the text i pass, which could be eliminated too. Or am i wrong there?

RE: [sqlite] methods to improve insertion speed with SQLite

2005-09-14 Thread Thomas Briggs
> However, I would very much like a "bulk insert" - call to > sqlite (Oracle > OCI does this, for example), where i can put many (thousands) > of records > into the database with one call. Is there any chance of > something like > this ever to be added to sqlite? I can't speak

Re: [sqlite] create database file at runtime

2005-09-14 Thread Nemanja Corlija
On 9/14/05, Mark Wyszomierski <[EMAIL PROTECTED]> wrote: > Hi everyone, > Two quick questions: > 1) Is there anything special the supplied sqlite3.exe does to create a > database file. I want to programatically create a database file at runtime, > so can I just create an empty xxx.db file, and

[sqlite] Column Naming Convention (yet again)

2005-09-14 Thread Drew, Stephen
Hello, It's that time of the month again - column naming convention discussion. The documentation states quite clearly: Case 4: short_column_names=OFF and full_column_names=OFF For this case (which was the default prior to version 3.1.0) the result is the same as for case 2 for simple

[sqlite] create database file at runtime

2005-09-14 Thread Mark Wyszomierski
Hi everyone, Two quick questions: 1) Is there anything special the supplied sqlite3.exe does to create a database file. I want to programatically create a database file at runtime, so can I just create an empty xxx.db file, and go ahead with create table statements to populate it? The

Re: [sqlite] methods to improve insertion speed with SQLite

2005-09-14 Thread Jay Sprenkle
On 9/14/05, Rajan, Vivek K <[EMAIL PROTECTED]> wrote: > > > I am wondering if there techniques/tricks which can improve the total > insertion speed of my application. Any suggestions/feedback? > Remove indexes from the tables you're inserting into. If you need that data for queries later you

Re: [sqlite] methods to improve insertion speed with SQLite

2005-09-14 Thread Michael Gross
Hello You can also speed up the inserts when creating the index after the inserts. To check the constraints you could use QDBM (http://qdbm.sourceforge.net/). Rajan, Vivek K wrote: Hello- In my application, I perform large number of insertions (~100K) to create a SQLite database. The

Re: [sqlite] Command line interface SQLITE 2.8.16

2005-09-14 Thread Nemanja Corlija
On 9/14/05, Sijm, Norbert <[EMAIL PROTECTED]> wrote: > > > > Hi, I'm trying to execute a command in a DOS batchfile , but I get a syntax > error. Is this supported in 2.8.16 ? > ( sqlite mydbase.db select * from table1; ) Try enclosing your SQL statements in double quotes, like this: sqlite

Re: [sqlite] Network-based DB performance for Mozilla

2005-09-14 Thread Edward Macnaghten
Please excuse me doing another reply to this but Sorry about this daft question, but you have indexed everythink OK and designed the database to a reasonable "BCNF"(Boyce Codd Normal Form) model havn't you? Eddy Brett Wilson wrote: Hi everybody, I'm working on replacing a lot of

Re: [sqlite] Network-based DB performance for Mozilla

2005-09-14 Thread Edward Macnaghten
To add my 2p worth to all this I am not fully aware of the Firefox internals, buts as far as my understanding goes only one process can use any profile at any time. If two "instances" of firefox are fired up for the same user (+ profile) then what happens as far as I understand is

[sqlite] Tuning a SELECT DISTINCT query?

2005-09-14 Thread ralf . deininger
Hi all, I have a performance issue with the following query: SELECT DISTINCT name FROM customproperty ORDER BY name; The table and an index is defined by: CREATE TABLE customproperty (parentID INTEGER NOT NULL, name VARCHAR(100) NOT NULL,

Re: [sqlite] methods to improve insertion speed with SQLite

2005-09-14 Thread Martin Engelschalk
Hello Vivek, I have a very similar application, without the foreign key constraints, however. If you use sqlite3_prepare() once for your statement, then sqlite3_bind_...() with every call, and if you wrap all the inserts int one transaction (seems that you do), your speed schould be optimal.

[sqlite] methods to improve insertion speed with SQLite

2005-09-14 Thread Rajan, Vivek K
Hello- In my application, I perform large number of insertions (~100K) to create a SQLite database. The method which I currently have is following: - Start a transaction - Insert into database (~100K inserts) - During the insert process, I also have to query the already inserted

RE: [sqlite] Network-based DB performance for Mozilla

2005-09-14 Thread Brandon, Nicholas
>If you can't tolerate the delays accessing the database over the >network, can you make a copy of the database in a temp directory on the >local machine on startup. If you copy the file after you lock the >profile it should be safe to copy down to local storage. Then use the >local database

RE: [sqlite] Intro SQL ?

2005-09-14 Thread Steve O'Hara
Richard, Not everything in life is free or immediate. If you're going to do some decent SQL you need to invest in a reference manual - my favourite SQL primer is "The Practical SQL Handbook" from Addison-Wesley Publishing ISBN 0-201-62623-3 My edition is acient but well worth the 20

[sqlite] Command line interface SQLITE 2.8.16

2005-09-14 Thread Sijm, Norbert
Hi, I'm trying to execute a command in a DOS batchfile , but I get a syntax error. Is this supported in 2.8.16 ? ( sqlite mydbase.db select * from table1; ) PS. When doing firm sqlite mydbase select ... it works ) Regards Norbert

Re: [sqlite] Intro SQL ?

2005-09-14 Thread Puneet Kishor
On Sep 14, 2005, at 12:56 AM, Richard Nagle wrote: Well, now I ready for the next step, looking for a intro into SQL... probably the most fun one out there is http://www.sqlzoo.net/ plus, it lets you practice against real instances of different rdbs. been searching google all night,