title: Specify both ordering indexes?
body: <p>I have a materialized view that has several columns of my most queried data.  Each column is used in where clasuses and each column is used for ordering ascending and descending nulls last.</p>
  
  <p>I initially just declared a multicolumn index with all columns listed on the index but then I noticed any queries that included an orderby were very slow.</p>
  
  <p>What is the right was to declare the indexes on this table?</p>
  
  <p>Should I do it like this:</p>
  
  <pre><code>create index idx_table_search_group 
    on search_table (column1, column1 asc, column1 desc nulls last, column2, column2 asc, column2 desc nulls last, ... etc);
  </code></pre>
  
  <p>I am not sure if this is too much and I don't have to declare 3 indexes for each column or not.</p>