title: Postgresql query very slow when selecting a key from a JSONB field object
body: <p>When including a key from the object stored in my <code>body</code> JSONB field the query is running ~100ms slower than without the field in the select:</p>
  
  <pre><code>SELECT id, 
         title,
         body-&gt;'_stats' AS stats
    FROM items
  </code></pre>
  
  <p>This takes about 105ms compared to only 5ms when the <code>stats</code> select isn't included. It doesn't seem to matter which key I return from the JSONB <code>body</code> object, they all significantly slow down the query. There are other keys from the body object I would like to include in this query, but each one I add increases the overall query time by ~50ms</p>
  
  <p>The <code>body</code> field has a gin index and I'm seeing the behaviour in both PG v9.5x and v9.6.1</p>
  
  <p>Any suggestions for alternative ways of returning jsonb object data more efficiently?</p>