title: Couchbase N1QL SELECT query using ORDER BY is very slow
body: <p>The following query is very slow:</p>
  
  <pre><code>select meta(d).id, timestamp_utc, d.headline, d.text from data_01 d where type="news" and topic="some_news" and timestamp_utc is not null order by timestamp_utc asc limit 1;
  </code></pre>
  
  <p>I created the following indices / indexes:</p>
  
  <pre><code> CREATE INDEX `idx_timestamp_utc` ON `data_01`((-str_to_millis(`timestamp_utc`)))
   CREATE INDEX `idx_timestamp_utc_some_news` ON `data_01`(`timestamp_utc`) WHERE ((`type` = "news") and (`topic` = "some_news"))
   CREATE INDEX `idx_topic_and_timestamp_utc` ON `data_01`(`topic`,(-str_to_millis(`timestamp_utc`)))
   CREATE INDEX `idx_type_news_topic_some_news_timestamp_utc` ON `data_01`((-`timestamp_utc`)) WHERE ((`type` = "news") and (`topic` = "some_news"))
  </code></pre>
  
  <ul>
  <li>None of this gives me a better performance than 1 minute. </li>
  <li>There are 3million documents in the bucket topic="some_news" has 300k
  docs.</li>
  <li>type="news" has around 2 million docs.</li>
  <li>field timestamp_utc has this format: "2017-01-01T00:00:00+00:00".</li>
  <li>field headline has an average length of ~100 characters.</li>
  <li>field text has an average of length ~2000 characters.</li>
  </ul>
  
  <p>I found similar problems but non of the given fixes and suggestions do work.</p>
  
  <p>Thank you for a response to solve this issue!</p>
  
  <p>I'm running Couchbase 4.5.1 Enterprise Edition (build-2844)</p>