От: Tobias Brox
Тема: timestamp indexing
Дата: ,
Msg-id: 20050530091951.GO26100@tobias.exoweb.net
(см: обсуждение, исходный текст)
Ответы: Re: timestamp indexing  (Michael Fuhr)
Список: pgsql-performance

Скрыть дерево обсуждения

timestamp indexing  (Tobias Brox, )
 Re: timestamp indexing  (Michael Fuhr, )
  Re: timestamp indexing  (Tobias Brox, )
   Re: timestamp indexing  (Tom Lane, )
    Re: timestamp indexing  (Tobias Brox, )
     Re: timestamp indexing  (Tobias Brox, )
      Re: timestamp indexing  ("Jim C. Nasby", )
       Re: timestamp indexing  (Tobias Brox, )

We have a production database with transaction-style data, in most of the
tables we have a timestamp attribute "created" telling the creation time of
the table row.  Naturally, this attribute is always increasing.

By now we are hitting the limit where the table data does not fit in caches
anymore.  We have a report section where there are constantly requests for
things like "sum up all transactions for the last two weeks", and those
requests seem to do a full table scan, even though only the last parts of
the table is needed - so by now those reports have started to cause lots of
iowait.

Is there any way to avoid this, apart from adding memory linearly with
database growth, make adjunct tables for historical rows, or build a
separate data warehousing system?  There must be some simpler solutions,
right?

--
Tobias Brox, Beijing


В списке pgsql-performance по дате сообщения:

От: Michael Fuhr
Дата:
Сообщение: Re: timestamp indexing
От: Sebastian Böck
Дата:
Сообщение: Index not used on join with inherited tables