Обсуждение: Partitions and Primary Keys

Поиск
Список
Период
Сортировка

Partitions and Primary Keys

От
Ian Dauncey
Дата:

Morning.

 

I have converted a few of our standard tables to partition tables (partition by HASH) and what I have noticed is that the some of the primary index columns have been switched around after the creation of the tables and partitions.

Can anyone shed some light as to why this happens.

We are running Postgresql V12.2 on Ubuntu 20.04.1 LTS

 

Below is an extract displaying the difference in the index

           table_name          

                    index_name                    

      column_names                              

 account_balance_beod          

 account_balance_beod_pkey                        

 yyyymmdd, accountid

account_balance_beod_part1    

 account_balance_beod_part1_pkey                  

 yyyymmdd, accountid

account_balance_beod_part2    

 account_balance_beod_part2_pkey                  

 accountid, yyyymmdd

account_balance_beod_part3    

 account_balance_beod_part3_pkey                  

 accountid, yyyymmdd

account_balance_beod_part4    

 account_balance_beod_part4_pkey                  

 accountid, yyyymmdd

account_balance_beod_part5    

 account_balance_beod_part5_pkey                  

 accountid, yyyymmdd

 

Regards

Ian



Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast, a leader in email security and cyber resilience. Mimecast integrates email defenses with brand protection, security awareness training, web security, compliance and other essential capabilities. Mimecast helps protect large and small organizations from malicious activity, human error and technology failure; and to lead the movement toward building a more resilient world. To find out more, visit our website.