Search Postgresql Archives

Re: Selecting large objects stored as bytea

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

 



On Fri, 22 Feb 2008, Daniel Verite wrote:

> You could use the function below that breaks a bytea value into
> pieces of 'chunksize' length and returns them as a set of rows.

When you do this then make sure that this column has external
storage:
	alter column [column_name] set storage external;
Then getting this chunks will be fast.

But be aware that external storage does not compress data, so you
would need more space for database if your data is compressible. Also
you'd need to dump, truncate and restore this table, as storage
option is only honored for new rows. Maybe just "cluster
[table_name]" will do, I don't know.

Regards
Tometzky
-- 
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[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