From: | Bill Moran <wmoran(at)potentialtech(dot)com> |
---|---|
To: | Benjamin Adams <freebsdworld(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Get DB Size by row |
Date: | 2012-07-21 11:03:40 |
Message-ID: | 20120721070340.7f04b0733a87f346f57c6ac3@potentialtech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 20 Jul 2012 08:27:37 -0400 Benjamin Adams <freebsdworld(at)gmail(dot)com> 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(at)potentialtech(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | leo xu | 2012-07-21 11:22:49 | postgresql ask for someparameters |
Previous Message | Craig Ringer | 2012-07-21 10:22:30 | Re: High CPU on read-only streaming replication server |