partition your table if it is too big.
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных