Re: [sqlite] Optimizing an insert/update

2008-03-01 Thread BareFeet
Hi Michael, > I have a table with two columns, the first with a string and the > second with > an integer. > Given a set of input strings, I want to perform this operation > 50,000+ times So maybe something like: create table InputTable ( InputString text collate nocase ) ; with

Re: [sqlite] Optimizing an insert/update

2008-02-29 Thread Dennis Cote
Michael Miller wrote: > I apologize if this is a double-post; I just got approved for the mailing > list, and I can't find the older message in the archives, so I'm reposting > it. > > I have a table with two columns, the first with a string and the second with > an integer. > > > Given a set

Re: [sqlite] Optimizing an insert/update

2008-02-29 Thread Cyril SCETBON
Michael Miller wrote: > I apologize if this is a double-post; I just got approved for the mailing > list, and I can't find the older message in the archives, so I'm reposting > it. > > I have a table with two columns, the first with a string and the second with > an integer. > > > Given a set

Re: [sqlite] Optimizing an insert/update

2008-02-29 Thread Lars Aronsson
Michael Miller wrote: > "If the string doesn't exist in the table, create a new row with > the string in the first column and 1 in the second column. If > the string does exist in the table, increment the second column > by 1" One way you can do it is to insert everything into a temporary

[sqlite] Optimizing an insert/update

2008-02-28 Thread Michael Miller
I apologize if this is a double-post; I just got approved for the mailing list, and I can't find the older message in the archives, so I'm reposting it. I have a table with two columns, the first with a string and the second with an integer. Given a set of input strings, I want to perform this