by branko_d · 10mo ago · 0 comments
Furthermore, why have two indexes with the same leading field (status)?
If you have more than 2 states, then just use integer instead or boolean.
> Saving a few bytes on the index isn't worth losing that observability.
Not sure why having a few well-known string values is more "observable" than having a few well-known integer values.
Also, it might be worth having better write performance. When PostgreSQL updates a row, it actually creates a new physical row version (for MVCC), so the less it has to copy the better.
> Furthermore, why have two indexes with the same leading field (status)?
That indeed is a valid question.