title: Why fetch cursor slow in postgres?
body: <p>I have a big table with about 100 millions rows per month.
  When I create cursor for  this month's records:</p>
  
  <pre><code>BEGIN;
  DECLARE cur CURSOR FOR SELECT * FROM marketo.activities
  WHERE activitydate&gt;'2019-07-01'::timestamp;
  FETCH 1 FROM cur;
  </code></pre>
  
  <p>It works very slow. I waited 5 minutes and cancel it. I have index on activitydate column.
  Why it is so, isn't cursor supposed to work fast fetching just one row from big query?</p>