Re: Proposition for better performance
От | hmidi slim |
---|---|
Тема | Re: Proposition for better performance |
Дата | |
Msg-id | CAMsqVxtRD5dCVL3o_eCWNdwo4igQCzjMgXTdD+sDVD8AHHkgDg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Proposition for better performance (Paul Jungwirth <pj@illuminatedcomputing.com>) |
Ответы |
Re: Proposition for better performance
|
Список | pgsql-general |
the query that I used to fetch products was:
select * from availabilityI added another column named during of type daterange and I created a gist index :
select * from availability
where during @> daterange(''27-03-2018', '31-03-2018');With a table of 15M rows I got an execution time of 1 minute.Thtat's why I asked if it is a good solution to divide the availability of a product by intervals.
If I assume that a product has in every month 5 availability intervals, in 12 months we will have 60 intervals.For 1M products that's will be 60M rows. This will affect the performance.
В списке pgsql-general по дате отправления: