BRIN stands for Block Range Index. BRIN indexes are different from indexes such as B-tree indexes. BRIN indexes do not store index details based on row IDs, but store the statistics of each data block or a series of consecutive data blocks. Therefore, BRIN indexes occupy a small amount of memory and have small impacts on data writes, updates, and deletion.

Operators

  • <
  • <=
  • =
  • >=
  • >

Scenarios

Streaming log data is inserted into a database in chronological order. The indexes must occupy a small amount of memory and the database must have high performance.

  • Create tables and insert data and other operations.Scenario 1
  • Example one: The difference between using index and deleting index.Scenario 2
  • Example two: The difference between using index and deleting index.Scenario 3