is there a way to automate deduplication of strings?

Поиск
Список
Период
Сортировка
От Chris Papademetrious
Тема is there a way to automate deduplication of strings?
Дата
Msg-id DM4PR12MB603953767048EE1B8A39283ADDB1A@DM4PR12MB6039.namprd12.prod.outlook.com
обсуждение исходный текст
Ответы Re: is there a way to automate deduplication of strings?
Список pgsql-novice

Hello everyone! First time poster here.

 

I have a question about deduplicating text strings stored in a database. I am aware of the pattern of creating a separate table for unique values, then referencing those values by key. But this requires some transactional complexity for storage and retrieval, along with cleanup of no-longer-referenced values over time. And, this complexity grows with the number of primary-table columns that use this indirection.

 

I would only use this for (1) seldom-referenced columns that (2) have a high rate of duplication and (3) have an average string length that makes deduplication worthwhile.

 

Are there any native or extension-based methods to simplify this in Postgres? I searched and came up empty, but maybe I’m not searching with the right terms.

 

Thanks!

 

  • Chris

 

 

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