title: How to create an index properly for DESC NULLS LAST sorting
body: <p>I created an index without specifying ordering or nulls first/last
  e.g.:</p>
  
  <pre><code>CREATE INDEX index_name ON TABLE table_name (date)
  </code></pre>
  
  <p>and now my <code>ORDER BY DESC NULLS LAST</code> queries run extremely slowly.</p>
  
  <p>I read in PostgreSQL documentation, that</p>
  
  <blockquote>
    <p>NULLS FIRST Specifies that nulls sort before non-nulls. This is the
    default when DESC is specified.</p>
    
    <p>NULLS LAST Specifies that nulls sort after non-nulls. This is the
    default when DESC is not specified.</p>
  </blockquote>
  
  <p>therefore if I create an index like this (for col <code>date</code>):</p>
  
  <pre><code>CREATE INDEX index_name ON TABLE table_name (date DESC NULLS LAST)
  </code></pre>
  
  <p>will I get a serious performance gain for queries like</p>
  
  <pre><code>SELECT * FROM table_name ORDER BY date DESC NULLS LAST LIMIT 50 OFFSET 0
  </code></pre>
  
  <p>?</p>