Re: UUID v1 optimizations...

Поиск
Список
Период
Сортировка
От Morris de Oryx
Тема Re: UUID v1 optimizations...
Дата
Msg-id CAKqncchpJg0AETb2ouvCzyap-htiyv6LN6ne+JnU9Jo4Ogt9HA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: UUID v1 optimizations...  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-performance


On Sun, May 26, 2019 at 8:37 PM Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:

No, an extra column is not a solution, because it has no impact on the
index on the UUID column.

Possibly talking at cross-purposes here. I was honing in on the OPs wish to search and sort by creation order. For which my first (and only) instinct would be to have a timestamp. In fact, the OP wants to work with multiple subcomponents encoded in their magic number, so I'm likely off base entirely. I have a long-standing allergy to concatenated key-like fields as they're opaque, collapse multiple values into a single column (0NF), and inevitably (in my experience) get you into a bind when requirements change.

But everyone's got their own point of view on such judgement calls. I'm not currently dealing with anything where the cost of adding a few small, fixed-type columns would give me a moment's hesitation. I'm sure we all like to save space, but when saving space costs you clarity, flexibility, and compute, the "savings" aren't free. So, it's a judgment call. The OP may well have 1B rows and really quite good reasons for worrying about disk-level optimizations. 

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

Предыдущее
От: Morris de Oryx
Дата:
Сообщение: Re: UUID v1 optimizations...
Следующее
От: Mariel Cherkassky
Дата:
Сообщение: improve wals replay on secondary