Search Postgresql Archives

Bytea/Text blob deletion is very slow...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

PG8,4, Window XP, Python.

I have a program that makes many picture version from an original with XNView effects.
Because I want preserve the integrity, previous datas, I used transactions, and PGSQL.

The main problem with blobs that insertion is good, the select is good, but the deletion is very slow.

I had 300 MB source, and 4 GB database with effect-converted images.
The table was:
blobs(id integer, file_id integer, ext char(3), size integer, blob bytea)
with primary key, and some index on file_id, ext, size.

But these indexes not matter, when I stored the blobs in the picture table in fields, I also got this problem.

Extremely slow - this meaning that I started a query that do:

delete * from blobs where file_id in ()

(file_id have index, and select is very fast on it). 

And I need to wait 2 hours for the deletion, and 1 hours for vacuum... :-(

I tried with PySQLite also. The deletion is also slow, but it was 30 minutes only, but compact was 1 hours process...

Ok, I know that better to store blobs in other ways, but I want to preserve the integrity, and anydbm (for example) is does not browsable, etc...

Prev. I tried with Text fields (and with Hexlify), but it was also slow. So something is basically wrong with blobs, or blob deletion...

Thanks for your help:
   dd




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux