1. 1
  1.  

  2. 2

    I have a rule of thumb to never use JSONB for storing data, except when 1) I can’t meaningfully reason about its schema (most often when the data comes from an external API) 2) it’s used as an optimization tool, similarly to how we use indexes.

    If I were the author of the article, I’d try to avoid needing the JSONB route at all. The “Getting all tickets with status OPEN” could probably be nearly optimal if rewritten to use a lateral join and an appropriate index. But if using a JSONB column can still improve performance, I certainly wouldn’t get rid of the existing normalized approach, because it gives the benefits that normalization usually provides.