Search Postgresql Archives

Re: Get DB Size by row

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

 



On Fri, 20 Jul 2012 08:27:37 -0400 Benjamin Adams <freebsdworld@xxxxxxxxx> wrote:

> Hello,
> 
> I'm looking to do something like:
> 
> select month, mb_size(description) from data where year = 2012 group by month
> 
> I also am looking for raw size not compressed size.

octet_length() will give you the size in bytes.  It's not the size in
characters, though, unless the field is using an encoding that's always
1 byte per character.  For character length, use (obviously)
character_length().

-- 
Bill Moran <wmoran@xxxxxxxxxxxxxxxxx>

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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