Hmm, strange - my testing produces very slow results (it took over a minute to update 120K rows).
Maybe it's because I'm also creating an index on the new row and doing an ANALYZE - do these 2 operations take considerable amount of time? There's also a VACUUM later on, which might be slow? (The database is around 900 MBs) Dennis -----Original Message----- From: P Kishor [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 11:04 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Is it possible to do this using only SQL? On 2/4/08, Dennis Volodomanov <[EMAIL PROTECTED]> wrote: > Oh, that looks simpler than I thought. Thank you for the reply! not only is it simple... .... > > On 04-Feb-2008, at 3:41 PM, Dennis Volodomanov wrote: > > > Is that possible? If not, I'll have to do it in the code, but that > > will > > probably be slower and I'm expecting to have tens of thousands of > > rows. it is also very fast. On my laptop it takes 7 secs to add a million upcased strings, and 8 secs to lowercase them. > > Sure: > > sqlite> create table x(a); > sqlite> insert into x(a) values('ABC'); > sqlite> insert into x(a) values('DEF'); > sqlite> alter table x add column b; > sqlite> update x set b=lower(a); > sqlite> select * from x; > ABC|abc > DEF|def > sqlite> > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://punkish.eidesis.org/ Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/ Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users