Re: Indexes with descending date columns

From: Theo Kramer
Subject: Re: Indexes with descending date columns
Date: ,
Msg-id: 1143629550.2985.29.camel@theo-laptop.int.coza.net.za
(view: Whole thread, Raw)
In response to: Re: Indexes with descending date columns  ("Jim C. Nasby")
Responses: Re: Indexes with descending date columns  ("Jim C. Nasby")
List: pgsql-performance

Tree view

Indexes with descending date columns  (Theo Kramer, )
 Re: Indexes with descending date columns  (, )
  Re: Indexes with descending date columns  (Theo Kramer, )
   Re: Indexes with descending date columns  (Alvaro Herrera, )
    Array performance  (Ruben Rubio Rey, )
     Re: Array performance  ("Jim C. Nasby", )
      Re: Array performance  (Ruben Rubio Rey, )
       Re: Array performance  ("Jim C. Nasby", )
        Re: Array performance  (Michael Fuhr, )
         limitation using LIKE on ANY(array)  (K C Lau, )
          Re: limitation using LIKE on ANY(array)  (Tom Lane, )
           Re: limitation using LIKE on ANY(array)  (K C Lau, )
     Re: Array performance  (Tom Lane, )
      Re: Array performance  (Ruben Rubio Rey, )
   Re: Indexes with descending date columns  ("Jim C. Nasby", )
    Re: Indexes with descending date columns  (Theo Kramer, )
     Re: Indexes with descending date columns  ("Jim C. Nasby", )
      Re: Indexes with descending date columns  (Bruce Momjian, )
       Re: Indexes with descending date columns  (Markus Schaber, )
  Re: Indexes with descending date columns  (Theo Kramer, )
   Re: Indexes with descending date columns  (Tom Lane, )

On Fri, 2006-03-24 at 12:21, Jim C. Nasby wrote:
> On Thu, Mar 23, 2006 at 01:09:49PM +0200, Theo Kramer wrote:
> > ii If no to i, is it feasible to extend PostgreSQL to allow traversing
> >    an index in column descending and column ascending order - assuming
> >    an order by on more than one column with column order not
> >    in the same direction and indexes existing? ... if that makes sense.
>
> Yes.
>
> stats=# explain select * from email_contrib order by project_id desc, id desc, date desc limit 10;
>                                                        QUERY PLAN
  
>
------------------------------------------------------------------------------------------------------------------------
>  Limit  (cost=0.00..31.76 rows=10 width=24)
>    ->  Index Scan Backward using email_contrib_pkey on email_contrib  (cost=0.00..427716532.18 rows=134656656
width=24)
> (2 rows)

Not quite what I mean - redo the above as follows and then see what
explain returns

explain select * from email_contrib order by project_id, id, date desc
limit 10;

--
Regards
Theo



pgsql-performance by date:

From: Vivek Khera
Date:
Subject: Re: Decide between Postgresql and Mysql (help of
From: "Eric Lauzon"
Date:
Subject: Database possible corruption , unsolvable mystery