Interesting, so sqlite3 is smart enough to actually move the blob instead
of copying and deleting? If it is the case it is indeed great.

On Sun, Apr 28, 2013 at 5:12 PM, Simon Slavin <slav...@bigfraud.org> wrote:
>
> On 28 Apr 2013, at 3:51pm, Paolo Bolzoni <paolo.bolzoni.br...@gmail.com> 
> wrote:
>
>> So I should write my BLOB in another (not-indexed) table, UPDATE the
>> indexed table copying from the other,
>> and finally delete the line in the first table? All in one transaction?
>
> That would work and would be a good solution if you change one BLOB at a time.
>
> Or you can assemble the BLOB in memory and then write it all in one UPDATE 
> command.
>
> Or you can have another BLOB column, an unindexed one, in the existing table 
> and do your editing to the value in that column:
>
> BEGIN
>     build up the BLOB
>     UPDATE myTable SET permBLOB = tempBLOB, tempBLOB = 0 WHERE recID = 123456
> END
>
> This assumes that your BLOB is a long one which takes a lot of space.  If it 
> isn't, you can just leave the value there rather than zeroing it out.
>
> Simon.
> _______________________________________________
> 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

Reply via email to