Re: Filtering by UUID

Поиск
Список
Период
Сортировка
От Guyren Howe
Тема Re: Filtering by UUID
Дата
Msg-id 8BC9BE09-063F-426A-BD95-ECA77225A840@gmail.com
обсуждение исходный текст
Ответ на Filtering by UUID  (Colin Morelli <colin.morelli@gmail.com>)
Ответы Re: Filtering by UUID  (Colin Morelli <colin.morelli@gmail.com>)
Список pgsql-general
On Sep 29, 2016, at 16:03 , Colin Morelli <colin.morelli@gmail.com> wrote:
>
> Hey list,
>
> I'm using UUID primary keys in my application. I need to add pagination, and am trying to avoid OFFSET/LIMIT. I do
havea created_at timestamp that I could use, but it's possible for multiple records to be created at the same timestamp
(postgresoffers millisecond precision here, I believe?) 
>
> Is there an efficient way to filter based on the time component of UUID v1s? WHERE id > 'some-uuid' doesn't seem to
work,as it looks like it's just performing a lexicographic sort on the hex representation of the UUID. Or,
alternatively,does anyone have other suggestions on paginating large data sets? 

Why not just sort on (created_at, uuid) (ie us the UUID just to force a complete ordering)?



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

Предыдущее
От: Colin Morelli
Дата:
Сообщение: Filtering by UUID
Следующее
От: Colin Morelli
Дата:
Сообщение: Re: Filtering by UUID