[sqlite] sqlite as server queries

2007-08-05 Thread Edwin Eyan Moragas
hi group, i have several small questions for the group any experiences or thoughts shared would be greatly appreciated. 1) anybody used sqlite as a sql server? i'm thinking of say using the embedded sqlite in PHP5 or similar. 2) anybody ever implemented something like a single process of sqlite

Re: [sqlite] QT4 ubuntu sqlite driver problem ? (was Re: [sqlite] Weird error)

2007-08-05 Thread Alain Bertrand
John Stanton a écrit : Alain Bertrand wrote: In a Qt4 application, I have the following bit of code : QString s; bool b; QSqlQuery q; QSqlError err; s= "CREATE TABLE ttd_bdata (sheetId integer primary key,"; s+="creation_date date, modif_date date,";

Re: [sqlite] [SQLite improve productivity]

2007-08-05 Thread Igor Mironchick
Thx, very helpfull reply. One more question: is it need to do "END" after "BEGIN" or enought "COMMIT"? By the way, some edition of sql query improve productivity a little bit too: // Columns in 'data' table defined like (INTEGER, INTEGER, INTEGER, TEXT) char * sql = sqlite3_mprintf( "INSERT

Re: [sqlite] [SQLite improve productivity]

2007-08-05 Thread Igor Mironchick
Thx, very helpfull reply. One more question: is it need to do "END" after "BEGIN" or enought "COMMIT"? By the way, some edition of sql query improve productivity a little bit too: // Columns in 'data' table defined like (INTEGER, INTEGER, INTEGER, TEXT) char * sql = sqlite3_mprintf( "INSERT

Re: [sqlite] Re: [2.8.x] Incrementing a column automatically with INSERT/UPDATE?

2007-08-05 Thread Gilles Ganault
At 02:21 06/08/2007 +0200, you wrote: I'm sorry to bother you again, but I can't figure out how to write a trigger that will set a column to 1 when a user creates a new record :-/ Found it in "Sam's Sqlite (2004)": CREATE TRIGGER insert_mytable_timestamp AFTER INSERT ON mytable BEGIN

Re: [sqlite] Re: [2.8.x] Incrementing a column automatically with INSERT/UPDATE?

2007-08-05 Thread Gilles Ganault
Hello At 15:28 04/08/2007 -0400, you wrote: UPDATE mytable SET timestamp = old.timestamp + 1 WHERE rowid=new.rowid; I'm sorry to bother you again, but I can't figure out how to write a trigger that will set a column to 1 when a user creates a new record :-/ I tried the following but

Re: [sqlite] [SQLite improve productivity]

2007-08-05 Thread Christian Smith
A common issue of high latency transactions. SQLite has a high per-transaction overhead, which can be amortized across multiple INSERTs or UPDATEs to improve the average INSERT rate. You are doing a single INSERT per transaction, so wrap multiple INSERTs inside a single "BEGIN" ... "END"

[sqlite] [SQLite improve productivity]

2007-08-05 Thread Igor Mironchick
Hi. How can I improve productivity of this code: a_messenger_t::data_buff_t --> std::deque< some_struct > // char * errors = 0; for( a_messenger_t::data_buff_t::const_iterator it =

RE: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-05 Thread RB Smissaert
Poor comparison in this case. Are you going to make a mathematical model when you got a little stream to cross and you have a few available planks to do it? RBS -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 05 August 2007 16:43 To: sqlite-users@sqlite.org

Re: [sqlite] UI question

2007-08-05 Thread John Stanton
John wrote: John wrote: Griggs, Donald wrote: Regarding: " Where I get tripped up is making a typo in a multiline query that may have destructive effects if I terminate with a ';' and allow the CLI to execute the query. To date I have aborted the CLI with a ^C (MS Windows). I would love have

Re: [sqlite] QT4 ubuntu sqlite driver problem ? (was Re: [sqlite] Weird error)

2007-08-05 Thread John Stanton
Alain Bertrand wrote: Joe Wilson a écrit : --- Alain Bertrand <[EMAIL PROTECTED]> wrote: > --- Alain Bertrand <[EMAIL PROTECTED]> wrote: In a Qt4 application, I have the following bit of code : QString s; bool b; QSqlQuery q; QSqlError err; s= "CREATE TABLE

Re: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-05 Thread John Stanton
We learn mathematics etc so that we can make numerical models which give us design information. Imagine trying to build every combination of a bridge to settle on a design! Make a mathematical model and get it close to optimal at the first attempt. RB Smissaert wrote: Yes, I suppose you are

Re: [sqlite] Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-05 Thread John Stanton
RB Smissaert wrote: But then if the base of the logarithm doesn't matter then how is this equation going to help you? m==N/logN So, basically it comes down to some experimenting? RBS No, the relationship is set by the math. An absolute measurement requires that you experiment to discover

Re: [sqlite] UI question

2007-08-05 Thread John
John wrote: Griggs, Donald wrote: Regarding: " Where I get tripped up is making a typo in a multiline query that may have destructive effects if I terminate with a ';' and allow the CLI to execute the query. To date I have aborted the CLI with a ^C (MS Windows). I would love have a means of

RE: [sqlite] Select, update on the row, and step leads to crash

2007-08-05 Thread karthikeyan
Hi, The sample code is below. I am trying this on windows(xp)(sqlite 3.3.13) and have disabled almost all sqlite features. When createUsingExec variable is true in the sample code, I am able to reproduce the problem. Thanks karthik //== begin

Re: [sqlite] UI question

2007-08-05 Thread John
Griggs, Donald wrote: Regarding: " Where I get tripped up is making a typo in a multiline query that may have destructive effects if I terminate with a ';' and allow the CLI to execute the query. To date I have aborted the CLI with a ^C (MS Windows). I would love have a means of

RE: [sqlite] UI question

2007-08-05 Thread Griggs, Donald
Regarding: " Where I get tripped up is making a typo in a multiline query that may have destructive effects if I terminate with a ';' and allow the CLI to execute the query. To date I have aborted the CLI with a ^C (MS Windows). I would love have a means of escaping/cancelling back to the prompt

Re: [sqlite] UI question

2007-08-05 Thread John
[EMAIL PROTECTED] wrote: Scott Derrick <[EMAIL PROTECTED]> wrote: This is probably a stupid question but has frustrated me a couple of times. When using the command line interface sqlite3, a couple of times I have forgotten to use the "." before a command. After that I get a "...>" prompt

[sqlite] QT4 ubuntu sqlite driver problem ? (was Re: [sqlite] Weird error)

2007-08-05 Thread Alain Bertrand
Joe Wilson a écrit : --- Alain Bertrand <[EMAIL PROTECTED]> wrote: > --- Alain Bertrand <[EMAIL PROTECTED]> wrote: In a Qt4 application, I have the following bit of code : QString s; bool b; QSqlQuery q; QSqlError err; s= "CREATE TABLE ttd_bdata (sheetId integer

RE: [sqlite] Re: Re: Re: Re: Re: Re: Re: How does SQLite choose the index?

2007-08-05 Thread RB Smissaert
Yes, I suppose you are right there. I will see if I can put together a report that runs all possible types of queries (sequentially) and then see if I have left anything out that would cause problems. RBS -Original Message- From: Gerry Snyder [mailto:[EMAIL PROTECTED] Sent: 05 August

[sqlite] Problem with glob '137*' ?

2007-08-05 Thread RB Smissaert
Queries where there is a glob comparison on a string that could be interpreted as a number always seem a bit slower than when comparing to a string that can't be compared to a number. So for example: select f from t where f glob '137*' is slower than: select f from t where f glob 'abc*' Is this