COMPRESS VALUES feature request

From: Erez Segal <erezsegal(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: COMPRESS VALUES feature request
Date: 2017-05-09 18:18:02
Message-ID: CAPo0pRFeB7vbcKqHAN55geW9tYmj+MG_HVugVkSp4KfHvphtmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Following a discussion in the IRC channel, I'd like to suggest a feature
request to the ToDo WIKI page <https://wiki.postgresql.org/wiki/Todo>.

The use case is having a column with strings/floats, where some values are
very common and can be compressed, while many other values are unique,
making a lookup table not efficient.

It can be part of a column definition, set in CREATE TABLE/ALTER TABLE
e.g. field VARCHAR(255) COMPRESS (NULL, 'EREZ', 'SEGAL')

The feature exists in TeraData:
https://community.teradata.com/t5/Database/how-does-compress-work-in-tables/td-p/13950

In the IRC channel - johto suggested an implementation:

<johto> if you want to get really fancy you could have two columns where
only one of set; one would be the value (if reasonably unique) and the
other the id (if not)
I'd like to add that an ENUM can be used instead of the id+lookup table in
the 2nd column for non unique values.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ilya Shkuratov 2017-05-09 18:26:24 Re: CTE inlining
Previous Message Petr Jelinek 2017-05-09 18:06:25 Re: logical replication deranged sender