From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Raghavendra Rao J S V <raghavendrajsv@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Size of the table is growing abnormally in my database.
Date: Sat, 25 Aug 2018 21:16:11 -0700
Message-ID: <7f06d91a-024e-bdcc-023f-1f3eeeea3586@aklaver.com> (raw)
In-Reply-To: <CAEHH7R4tkd4s+K5MXjVtBY6qjkwORaai0pgwy5_q-1rPWJ_DcA@mail.gmail.com>
References: <CAEHH7R4tkd4s+K5MXjVtBY6qjkwORaai0pgwy5_q-1rPWJ_DcA@mail.gmail.com>
On 08/25/2018 08:36 PM, Raghavendra Rao J S V wrote:
> Hi All,
>
> One of our database size is 50gb. Out of it one of the table has
> 149444622 records. Size of that table is 14GB and its indexes size is 16GB.
> Total size of the table and its indexes are 30GB. I have perfomred the
> below steps on that table.
>
> reindex table table_name;
>
> vacuum full verbose analyze on table_name;
>
> But still the size of the table and its indexes size are not reduced.
> Please guid me. How to proceed further.
Rough approximation:
14,000,000,000 / 150,000,000 = 93 bytes/record.
I am not seeing an issue. If you want to reduce the size of the table
remove rows.
>
> Structure of the table as below.
>
> Column | Type | Modifiers | Storage |
> Stats target | Description
> ---------------------+------------------+-----------+---------+--------------+-------------
> col1| bigint | | plain | |
> col2 | double precision | | plain | |
> col3| double precision | | plain | |
> col4| double precision | | plain | |
> col5| double precision | | plain | |
> col6date| date | | plain | |
> tkey | integer | | plain | |
> cid | integer | | plain | |
> rtypeid | integer | | plain | |
> rid | integer | | plain | |
> ckey | bigint | | plain | |
> Indexes:
> "idx_tab_cid" btree (cid)
> "idx_tab_ckey" btree (ckey)
> "idx_tab_col6date" btree (col6date)
> "idx_tab_rid" btree (rid)
> "idx_tab_rtype_id" btree (rtypid)
> "idx_tab_tkey" btree (tkey)
>
>
> --
> Regards,
> Raghavendra Rao J S V
> Mobile- 8861161425
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, raghavendrajsv@gmail.com
Subject: Re: Size of the table is growing abnormally in my database.
In-Reply-To: <7f06d91a-024e-bdcc-023f-1f3eeeea3586@aklaver.com>
References: <CAEHH7R4tkd4s+K5MXjVtBY6qjkwORaai0pgwy5_q-1rPWJ_DcA@mail.gmail.com> <7f06d91a-024e-bdcc-023f-1f3eeeea3586@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox