Junior — Middle
What type of index is used by default in the PostgreSQL database?
sobes.tech AI
Answer from AI
In PostgreSQL, the default index type is B-tree (balanced tree).
A B-tree index is well-suited for most comparison operations, such as =, <, <=, >, >=, as well as for sorting and range searches.
Example of creating a default index:
CREATE INDEX idx_name ON table_name(column_name);
This index will be a B-tree unless another type is explicitly specified.