primary key size is huge

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

 



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
 
 
 

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux