RE: [sqlite] Insert statement taking too long

2006-11-08 Thread Robert Simpson
You need to create an index on the columns you're joining. Otherwise I believe 100,000,000 rows (10k x 10k) in table 2 will be scanned while SQLite looks for matches against the 10,000 rows in table 1. > -Original Message- > From: Unit 5 [mailto:[EMAIL PROTECTED] > Sent: Wednesday,

[sqlite] Insert statement taking too long

2006-11-08 Thread Unit 5
Hello, I am seeing an interesting performance issue with INSERT statements. I am using Sqlite 3.3.5 on a Windows XP box. Here is a brief summary of the situation: Insert statements that require no join are quite fast: a) I create an empty table (drop it first if it exists). b) INSERT ... SELECT

[sqlite] Fw: Why can't I delete tmp.db after close sqlite?

2006-11-08 Thread LuYanJun
if the file is new for opening, then success for delete, in other hand, if the file is old for opening, then failed for delete. example as follow: sqlite3_open("tmp.db", ); //tmp.db is exist - Original Message - From: LuYanJun To: sqlite-users sqlite.org Sent: Thursday, November 09,

[sqlite] Why can't I delete tmp.db after close sqlite?

2006-11-08 Thread LuYanJun
Hi all Why can't I delete tmp.db after close sqlite? sqlite3* mpDB; int nRet = sqlite3_open("tmp.db", ); if (nRet != SQLITE_OK) { const char* szError = sqlite3_errmsg(mpDB); printf("open error:%s\n",szError); } sqlite3_close(mpDB); printf("close!\n"); if ( !

Re: [sqlite] Date data type

2006-11-08 Thread Dennis Cote
Lloyd wrote: I would like to know one more thing, can I use these date and time functions with comparison operators? Will they return the correct result or as per the string comparison rules? Lloyd, You can use either the string comparisons with the text versions of the dates or numeric

RE: [sqlite] Dropping Tables

2006-11-08 Thread Rich Shepard
On Wed, 8 Nov 2006, Griggs, Donald wrote: See: http://www.sqlite.org/lang_droptable.html Just take the syntax link for most any syntax question: http://www.sqlite.org/lang.html Thanks, Donald. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied

RE: [sqlite] Dropping Tables

2006-11-08 Thread Griggs, Donald
Regarding: "Since I cannot learn how to drop a table from a database by referring to Owens' book, I hope that someone here can point me in the right direction." See: http://www.sqlite.org/lang_droptable.html Just take the syntax link for most any syntax question:

[sqlite] Dropping Tables

2006-11-08 Thread Rich Shepard
I need to alter a table by adding a numeric primary key field. Since I cannot do this with sqlite3's implementation of ALTER, I want to drop the table and re-import a corrected version with the name. But, I cannot find a command to drop a _table_, only the entire database. This surprises me.

Re: [sqlite] PHP5 with SQLite3

2006-11-08 Thread Lloyd Thomas
- Original Message - From: "Rúben Lício" <[EMAIL PROTECTED]> To: Sent: Wednesday, November 08, 2006 1:03 PM Subject: [sqlite] PHP5 with SQLite3 Are you connecting correctly to the database. Which version of sqlite3 was the database created in. I beleive

Re: [sqlite] Date and time

2006-11-08 Thread John Stanton
Your machine has the timezone recorded and localtime uses that to make the appropriate correction from UTC (Greenwich or Zulu) time. This approach makes the time correct if you are operating across time zones. It is the way your Unixepoch time expects to work. A machine which gives the

Re: [sqlite] weird (and dangerous) bug in Microsoft Compiler

2006-11-08 Thread John Stanton
What would you expect 9.95 to round to? Here are the simple rounding rules - Rule 1- if the remainder beyond the last digit to be reported is less than 5, drop the last digit. Rounding to one decimal place, the number 5.3467 becomes 5.3. Rule 2-if the remainder is greater than 5, increase

RE: [sqlite] Using BLOBs in where fields

2006-11-08 Thread Gabriel Cook
Gabriel Cook wrote: > Thanks for your reply. > > However, I can't normalize the data in the blob, basically, its an arbitrary > frame of data. I don't know what's in it or how its formatted at design > time. > > I'm ok with the table scan, IF I there is any way I can get the query to > work.

RE: [sqlite] weird (and dangerous) bug in Microsoft Compiler

2006-11-08 Thread Robert Simpson
I compiled everything from bare source myself. I maintain the ADO.NET 2.0 wrapper. > -Original Message- > From: mike cariotoglou [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 08, 2006 9:18 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] weird (and dangerous) bug in

Re: [sqlite] weird (and dangerous) bug in Microsoft Compiler

2006-11-08 Thread mike cariotoglou
did you also compile the ado .net wrapper ? - Original Message - From: "Robert Simpson" <[EMAIL PROTECTED]> To: Sent: Wednesday, November 08, 2006 4:57 PM Subject: RE: [sqlite] weird (and dangerous) bug in Microsoft Compiler I tried that same SELECT

RE: [sqlite] weird (and dangerous) bug in Microsoft Compiler

2006-11-08 Thread Robert Simpson
I tried that same SELECT statement in 3 builds of SQLite on VS2005. The code was called from C# using the ADO.NET 2.0 wrapper, and I got 10 all 3 times. I tried /fp:fast, /fp:strict and /fp:precise The rest of the build options were: AdditionalOptions="/GS-"

[sqlite] PHP5 with SQLite3

2006-11-08 Thread Rúben Lício
Hi, I'm trying to use PHP5 with SQLite 3, but it's not working. I see then the native PHP only suporte SQLite 2.8, but i can compile last version of php with SQLite 3 suport. O compile last PHP version with this line: make clean && ./configure --prefix=/usr/local/php5 --enable-pdo

Re: [sqlite] Q about new SQLite API

2006-11-08 Thread Christian Smith
[EMAIL PROTECTED] uttered: I'm working on a new API routine for SQLite and I have questions for the community. The working name of the new api is sqlite3_prepare_v2(). sqlite3_prepare_v2() works like sqlite3_prepare() in that it generates a prepared statement in an sqlite3_stmt structure. The

[sqlite] weird (and dangerous) bug in Microsoft Compiler

2006-11-08 Thread mike cariotoglou
hello to all. I wish to report some quirks I discovered with floating point and ROUND() function, while looking into a problem reported by my development team wrt to sqlite handling of above function. first of all, let me state that I understand the issues with inexact floating point

[sqlite] More recent version with php

2006-11-08 Thread VIGNY Cecilia
Hi, Does anybody know if a more recent version of SQLite will be integrated soon with php ? Thanks. Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations