From: | "Mackay, Beth (ES)" <elizabeth(dot)mackay(at)ngc(dot)com> |
---|---|
To: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Cc: | "Mackay, Beth (ES)" <elizabeth(dot)mackay(at)ngc(dot)com> |
Subject: | primary key size is huge |
Date: | 2016-03-30 16:14:37 |
Message-ID: | 54c2e6ed979a4d3386ad3202e17fc662@XCGVAG26.northgrum.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
My customer is concerned about the amount of RAM being used on their database server.
I have a table with 172 GB of data, and it has a corresponding primary key, which also has 49 GB of data. I found the sizes of the data using the "Finding the size of your biggest relations" section of this wiki: https://wiki.postgresql.org/wiki/Disk_Usage
I'm running PostgreSQL 8.1.9 (I know, it's ancient and long past end of life but I can't get my customer to upgrade). They are running the autovacuum process.
Is that size primary key table expected? If I have another copy of the database, this time with 93 MB of data in my table, it still has a corresponding 27 MB primary key. Another curious thing is that sometimes I have no data in the table, but the primary key is still 21 MB. In the case with no data in the table, data may have been in the table at one point but has since been deleted.
Would these large primary keys have any impact on the RAM used by the server? Is there some way to reduce their sizes?
Thanks,
Beth MacKay
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Aguayo Garcia-Rada | 2016-03-30 20:52:00 | Re: primary key size is huge |
Previous Message | Pavlov, Vladimir | 2016-03-29 13:28:54 | Re: MultiXact member wraparound protections |