primary key size is huge

Поиск
Список
Период
Сортировка
От Mackay, Beth (ES)
Тема primary key size is huge
Дата
Msg-id 54c2e6ed979a4d3386ad3202e17fc662@XCGVAG26.northgrum.com
обсуждение исходный текст
Ответы Re: primary key size is huge
Список 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
 
 
 

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Pavlov, Vladimir"
Дата:
Сообщение: Re: MultiXact member wraparound protections
Следующее
От: Alvaro Aguayo Garcia-Rada
Дата:
Сообщение: Re: primary key size is huge