Re: [sqlite] Types for strings, non-expert question

2009-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dennis Cote wrote: > Do you have a list of such changes that should be implemented in the > next breaking release of SQLite? I assume you are talking about a major release (ie SQLite v4 not 3.7). > I'm thinking of things like renaming the _v2 API

Re: [sqlite] 3.4.2 source code for Windows is required

2009-06-01 Thread Buu Hao Tran
Hi, Thank you! We very much appreciate your help. Very strange that we could not find this code. We found a lots of code, but not usable in Windows. -- Best regards, Chan Monday, June 1, 2009, 6:37:49 PM, you wrote: > Hi, > A 30 second search on Google yielded >

Re: [sqlite] Should we upgrade the SQLite to 6.6.14.2 from 3.59

2009-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joanne Pham wrote: > I send this email to the group to ask the question just in case if someone in > group has done the bench mark then it will save my time. You asked about "SQLite database operation like Read/Write". While technically that

Re: [sqlite] Should we upgrade the SQLite to 6.6.14.2 from 3.59

2009-06-01 Thread John Elrick
Joanne Pham wrote: > Hi All, > We are currently using SQLite 3.59 for our product and We will have the > release in middle of June. > If you must ask this question and your release is two weeks away, the answer is "do not upgrade". We have a battery of unit tests we run, I have complete

Re: [sqlite] Populating dyadic dataset

2009-06-01 Thread John Machin
On 2/06/2009 10:17 AM, Vincent Arel wrote: > Your python-like example is also quite helpful. It is not "python-like". Apart from the "..." in the initial data "vectors", it is executable Python code. > As I understand it, you > basically implement Igor's suggestion of running loops on the

Re: [sqlite] Types for strings, non-expert question

2009-06-01 Thread Dennis Cote
D. Richard Hipp wrote: > On May 27, 2009, at 9:36 AM, MaurĂ­ cio wrote: > > >> Hi, >> >> I see that in most functions strings are typed as >> >> char * >> >> while in 'sqlite_column_text' and 'sqlite_value_text' >> they are typed as >> >> unsigned char * >> >> > > That was just bad

Re: [sqlite] Populating dyadic dataset

2009-06-01 Thread Vincent Arel
@ Igor Tandetnik: You are right, of course. I come from R, and it is quite likely that my task would be accomplished more easily using that language. @ John Stanton: Thank you for your suggestion, I will keep it in mind when comes time to generate the ID entry. @ John Machin: You are also right.

Re: [sqlite] Populating dyadic dataset

2009-06-01 Thread John Machin
On 2/06/2009 8:07 AM, Vincent Arel wrote: > Hi everyone, > > I'm very, very new to SQLite, and would appreciate any help I can get. Unless I'm very very confused, this has very little to do with SQL at all (let alone SQLite) apart from using an INSERT statement to dispose of the final product.

Re: [sqlite] Should we upgrade the SQLite to 6.6.14.2 from 3.59

2009-06-01 Thread Kees Nuyt
On Mon, 1 Jun 2009 15:39:11 -0700 (PDT), Joanne Pham wrote: > I send this email to the group to ask the question > just in case if someone in group has done the > benchmark then it will save my time. You are the only one who can run that benchmark, because no one else

Re: [sqlite] Should we upgrade the SQLite to 6.6.14.2 from 3.59

2009-06-01 Thread P Kishor
On Mon, Jun 1, 2009 at 5:39 PM, Joanne Pham wrote: > Thanks Roger for the "nice" respond. > I send this email to the group to ask the question just in case if someone in > group has done the bench mark then it will save my time. > If I know the result by trying the newer

Re: [sqlite] Populating dyadic dataset

2009-06-01 Thread John Stanton
You might consider using a composite key "1963 CAN ABB" when you design your data structure. Igor Tandetnik wrote: > Vincent Arel > wrote: > >> I'm very, very new to SQLite, and would appreciate any help I can get. >> >> I have 3 long vectors that look like this: >>

Re: [sqlite] Should we upgrade the SQLite to 6.6.14.2 from 3.59

2009-06-01 Thread Joanne Pham
Thanks Roger for the "nice" respond. I send this email to the group to ask the question just in case if someone in group has done the bench mark then it will save my time. If I know the result by trying the newer SQLite than I won't ask this question right? You don't need to ask me to read the

Re: [sqlite] Populating dyadic dataset

2009-06-01 Thread Igor Tandetnik
Vincent Arel wrote: > I'm very, very new to SQLite, and would appreciate any help I can get. > > I have 3 long vectors that look like this: > {"ALB","CAN", "DZA",...} > {"ALB","CAN", "DZA",...} > {"1961","1962", "1963",...} > > And I want to create a table that looks like

Re: [sqlite] Should we upgrade the SQLite to 6.6.14.2 from 3.59

2009-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joanne Pham wrote: > Do you think that upgrade the SQLite to newer version 3.6.14.2 from 3.5.9 > will be help to improve the SQLite database operation like Read/Write? What results did you see when you tried the newer SQLite against your queries

[sqlite] Should we upgrade the SQLite to 6.6.14.2 from 3.59

2009-06-01 Thread Joanne Pham
Hi All, We are currently using SQLite 3.59 for our product and We will have the release in middle of June. We have been facing a lot of problem regarding performance and next release we can to able to scale up to 4 times faster than previous release. Do you think that upgrade the SQLite to

[sqlite] Populating dyadic dataset

2009-06-01 Thread Vincent Arel
Hi everyone, I'm very, very new to SQLite, and would appreciate any help I can get. I have 3 long vectors that look like this: {"ALB","CAN", "DZA",...} {"ALB","CAN", "DZA",...} {"1961","1962", "1963",...} And I want to create a table that looks like this: IDVar1Var2Var3 1ALB

Re: [sqlite] Slow Transaction Speed?

2009-06-01 Thread Nicolas Williams
On Mon, Jun 01, 2009 at 03:09:46AM +0100, Simon Slavin wrote: > On 31 May 2009, at 11:56pm, John Stanton wrote: > > You will then understand the reason for absolute transactional > > integrity and why Sqlite must use fsync or similar and expects fsync > > to be a complete implementation which

Re: [sqlite] GROUPY BY alias backward incompatibility

2009-06-01 Thread Nicolas Williams
On Thu, May 28, 2009 at 04:30:14PM +0200, Ralf Junker wrote: > select > (select count(*) from t t_inner > group by t_outer.c) -- t_outer !!! > from t t_outer; > > select > (select count(*) from t t_inner > group by t_inner.c) -- t_inner !!! > from

Re: [sqlite] Slow Transaction Speed?

2009-06-01 Thread Jim Wilcoxson
Microsoft has an interesting article on hard drive caches re: SQL Server: http://support.microsoft.com/kb/234656 "Many disk drives (SATA, ATA, SCSI and IDE based) contain onboard caches of 512 KB, 1 MB, and larger. Drive caches usually rely on a capacitor and not a battery-backed solution. These

Re: [sqlite] Slow Transaction Speed?

2009-06-01 Thread John Stanton
Simon Slavin wrote: > On 31 May 2009, at 11:56pm, John Stanton wrote: > > >> Try studying basic database theory and technology to get a better >> understanding of the problem. >> > > I have a pretty good understanding, I think. Plus 25 years experience. > Is it 23 years experience or 1

Re: [sqlite] Difference between sqlite3_bind_zeroblob & sqlite3_bind_blob( , , , 0, )

2009-06-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 chandan wrote: > ret = sqlite3_bind_zeroblob(stmt, 2, -1); That binds zero length blob (last parameter being zero or negative). > ret = sqlite3_bind_blob(stmt, 2, blob, 0, SQLITE_TRANSIENT); That binds a zero length blob, asking SQLite to

Re: [sqlite] Question on Indexing

2009-06-01 Thread Jay A. Kreibich
On Mon, Jun 01, 2009 at 12:32:26PM +0200, Ralf scratched on the wall: > Hello, > [>> ] considering a m:n relation a.id <- a.id,b.id -> b.id, is it due to > performance, advisable to put an index on a.id,b.id ? Yes, but very likely not for the reasons you're thinking. In a many-to-many bridge

[sqlite] Difference between sqlite3_bind_zeroblob & sqlite3_bind_blob( , , , 0, )

2009-06-01 Thread chandan
Hi, Is there any difference between the following code snippets: - ret = sqlite3_bind_zeroblob(stmt, 2, -1); if (ret != SQLITE_OK) { fprintf(stderr, "Unable to bind: %s", sqlite3_errmsg(db));

Re: [sqlite] Question on Indexing

2009-06-01 Thread Kees Nuyt
On Mon, 1 Jun 2009 12:32:26 +0200, "Ralf" wrote: >Hello, >[>> ] considering a m:n relation a.id <- a.id,b.id -> b.id, is it due to >performance, advisable to put an index on a.id,b.id ? a_id,b_id should be unique in the relationship table, so you should make (a_id,b_id) the

Re: [sqlite] SQLiteException: no such table

2009-06-01 Thread Manasi Save
Hi, I am sorry. But I didn't understand what do you mean by ASCII versus UTF-8 or UTF-16? -- Thanks and Regards, Manasi Save > On Mon, 1 Jun 2009 04:38:37 -0700 (PDT), "Manasi Save" > wrote: > >>Hi, >> >>we are developing an application on android we are

Re: [sqlite] (no subject)

2009-06-01 Thread Kees Nuyt
On Mon, 1 Jun 2009 04:38:37 -0700 (PDT), "Manasi Save" wrote: >Hi, > >we are developing an application on android we are using SQLite Database >and on phone we are getting SQLiteException:no such table. but, it is >working fine on simulator. > >Can anyone

[sqlite] SQLite Exception: no such table on Android

2009-06-01 Thread Manasi Save
Hi, Sorry for (no subject) :P we are developing an application on android we are using SQLite Database and on phone we are getting SQLiteException:no such table. but, it is working fine on simulator. Can anyone provide any input on this? -- Thanks and Regards, Manasi Save

Re: [sqlite] UPDATE TRIGGER works in all records

2009-06-01 Thread Igor Tandetnik
Oliver Peters wrote: > After an UPDATE in a record I want the update time stored in a column > of this record - the problem is that the trigger I use doesn't work > only in this record but in all others > > CREATE TRIGGER IF NOT EXISTS t_update_a > AFTER UPDATE ON t > BEGIN > UPDATE t SET b

[sqlite] (no subject)

2009-06-01 Thread Manasi Save
Hi, we are developing an application on android we are using SQLite Database and on phone we are getting SQLiteException:no such table. but, it is working fine on simulator. Can anyone provide any input on this? -- Thanks and Regards, Manasi Save Artificial Machines Pvt Ltd.

Re: [sqlite] UPDATE TRIGGER works in all records

2009-06-01 Thread Pavel Ivanov
Your trigger basically does this: UPDATE t SET b = DATETIME('now','localtime') WHERE 1 != 0; So it updates all rows in the table. Try to change it to this: UPDATE t SET b = DATETIME('now','localtime') WHERE rowid = new.rowid; Pavel On Sun, May 31, 2009 at 7:44 AM, Oliver Peters

Re: [sqlite] 3.4.2 source code for Windows is required

2009-06-01 Thread Mihai Limbasan
Hi, A 30 second search on Google yielded http://www.hwaci.com/sw/sqlite/sqlite-amalgamation-3_4_2.zip HTH. On 06/01/2009 02:29 PM, Buu Hao Tran wrote: > Hi, > We urgently need SQLite 3.4.2 source code buildable in Windows. Pls help! > Thanks > Chan >

[sqlite] 3.4.2 source code for Windows is required

2009-06-01 Thread Buu Hao Tran
Hi, We urgently need SQLite 3.4.2 source code buildable in Windows. Pls help! Thanks Chan ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Question on Indexing

2009-06-01 Thread Simon Slavin
On 1 Jun 2009, at 11:32am, Ralf wrote: > [>> ] considering a m:n relation a.id <- a.id,b.id -> b.id, is it > due to > performance, advisable to put an index on a.id,b.id ? Index both fields in your 'middle' file individually unless you expect it to stay very small. The 'id' fields in your

Re: [sqlite] Join performance in SQLite

2009-06-01 Thread BardzoTajneKonto
> Do other SQL database engines not have this same limitation?" Are MySQL > and PostgreSQL and Firebird and MS-SQL and Oracle creating phantom > indices on-the-fly to help them do joins faster, for example?" Or do > their optimizers do a better job of finding ways to use indices in a > join?"

[sqlite] UPDATE TRIGGER works in all records

2009-06-01 Thread Oliver Peters
After an UPDATE in a record I want the update time stored in a column of this record - the problem is that the trigger I use doesn't work only in this record but in all others Here's my script for reproduction: - CREATE TABLE IF NOT EXISTS t( a

[sqlite] Question on Indexing

2009-06-01 Thread Ralf
Hello, [>> ] considering a m:n relation a.id <- a.id,b.id -> b.id, is it due to performance, advisable to put an index on a.id,b.id ? Thanks Ralf ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] journey mode TRUNCATE is to append ? not overwrite?

2009-06-01 Thread John Machin
On 1/06/2009 5:29 PM, pierr wrote: > Hi all, > > Section 7.9 of http://www.sqlite.org/atomiccommit.html mentioned: > > "On embedded systems with synchronous filesystems, TRUNCATE results in > slower behavior than PERSIST. The commit operation is the same speed. But > subsequent transactions are

[sqlite] RAISE with "select"

2009-06-01 Thread Dimce Tumbov
Hi there, I'm trying to manage to have a RAISE inside a trigger bringing out a language-customized message, but without success. I have the problem that RAISE doesn't accept neither variable nor "select" statements as an argument, but only the construction RAISE(rollback, "this is the error

[sqlite] journey mode TRUNCATE is to append ? not overwrite?

2009-06-01 Thread pierr
Hi all, Section 7.9 of http://www.sqlite.org/atomiccommit.html mentioned: "On embedded systems with synchronous filesystems, TRUNCATE results in slower behavior than PERSIST. The commit operation is the same speed. But subsequent transactions are slower following a TRUNCATE because it is faster