On Mar 26, 2010, at 8:11 AM, NSRT Mail account. wrote:

> I have a database with a single table. The database is 23922826240  
> bytes. The table has 2147483685 rows in it.
>
> Running: UPDATE t SET v=1; makes my application start to use all  
> available RAM, then swap, and is finally killed by the OS (I do not  
> have 23GB of free RAM+swap).

As part of UPDATE processing, the rowid of every row to be updated is  
stored in RAM.  Normally this is not a problem, since it is unusual to  
want to update 2147483685 rows in one go.

Try running your updates in batches of a million or so.

>
> Should running an UPDATE cause the table to first be copied to RAM  
> and modified there? Is there any way to get this UPDATE to work with  
> meager resources (given at least 50GB free on the partition the  
> database is stored on)?
>
> Thanks.
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

D. Richard Hipp
d...@hwaci.com



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

Reply via email to