Re:

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re:
Дата
Msg-id CAKFQuwaOjOV3XS0XVpS6u1LSPcVTG6Oj_i_5hKLnm00a2ime_A@mail.gmail.com
обсуждение исходный текст
Ответ на Re:  (Steve Midgley <science@misuse.org>)
Список pgsql-sql
On Tuesday, February 1, 2022, Дмитрий Воронин <carriingfate92@yandex.ru> wrote:
 
...
"dates": ["2019-10-02", "2018-02-03"]
...
 
So, I want to SELECT all docids, which dates in range:
 


So, searching on dates field will be often and I want speed up by indexing but I don't known how.

Create a generated column of type daterange and populate that on insert/update.  Index that column.  Write queries against that column. (Not tested, but in short get rid of the json pseudo daterange array implementation and use the real SQL daterange type)

David J.

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

Предыдущее
От: Steve Midgley
Дата:
Сообщение: Re:
Следующее
От: aditya desai
Дата:
Сообщение: Re: How can i pass variable in dblink_connect_u ?