Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A large number of “Delete” or “Update” operations carried out on the table may lead to a so-called ‘index bloat’. The problem occurs in indexes based on B-trees and consists in the appearance of many empty or almost empty pages in the index. Such a ‘bloating’ results in an increased size of the database and decreases its efficiency; the efficiency may even fall below the acceptable threshold. The solution is to reconstruct the index in accordance with the information given in the PostgreSQL documentation.

Duża liczba operacji DELETE czy UPDATE wykonywanych na tabeli może prowadzić do wystąpienia tzw. "index bloat". Problem występuje w indeksach opartych na B-drzewach i polega na tym, że w indeksie występuje wiele pustych lub prawie pustych stron. Takie "nadmuchanie" indeksu skutkuje zwiększonym rozmiarem bazy danych i prowadzi do obniżenia jej wydajności nawet do nieakceptowalnego poziomu. Rozwiązaniem jest przebudowanie indeksu zgodnie z informacjami podanymi w dokumentacji PostgreSQL.

The following SQL queries may be helpful when checking the size of the table size before and after the reconstruction of indexes:

...