Simon Slavin wrote:

> 
> On 7 Dec 2009, at 9:58pm, Chris Eich wrote:
> 
> > On my Linux platform, I find that the INSERT
> > INTO archive.my_table SELECT * FROM my_table WHERE (...) takes unreasonably
> > long (it involves about 30MB of data).
> 
> Do you have a transaction around all the INSERT commands ?  This will speed 
> it up many fold.

there aren't multiple insert commands.
only a single insert command was mentioned.
it would be a single transaction already.

i have no advice, i'm just pointing out that
this advice seems to be based on the false
assumption that multiple transactions are
involved (because this is the most common
reason why things slow down).

> Another thing which will increase speed is to DROP all indexes (apart
> from PRIMARY KEY) before the INSERT commands, and recreate them
> afterwards.
>
> There's no reason why you shouldn't pursue the technique you
> mentioned, but I thought I'd give you an alternative you might prefer.
> 
> Simon.

cheers,
raf

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to