1

How is the read / write performance with the unlogged table different from index and non-index?

1 Answer 1

5

UNLOGGED has no impact on the speed of SELECT statements, but it makes all data modifying statements faster, because no WAL has to be written.

Tables without any index are very fast for INSERT, because rows are just stuffed into the first best block of the “heap” where there is room. Indexes are up to an order of magnitude more expensive to modify, because the order has to be preserved.

The question of LOGGED/UNLOGGED is independent from the question of indexed/not indexed. Both UNLOGGED and not indexed speed up data modifications.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.