Re: Why so much time difference with a same query/plan?

From: Karl Vogel
Subject: Re: Why so much time difference with a same query/plan?
Date: ,
Msg-id: m3y8flkzs8.fsf@telenet.be
(view: Whole thread, Raw)
In response to: Re: Why so much time difference with a same query/plan?  (Yann Michel)
Responses: Re: Why so much time difference with a same query/plan?  (Bruno Wolff III)
List: pgsql-performance

Tree view

Why so much time difference with a same query/plan?  (Litao Wu, )
 Re: Why so much time difference with a same query/plan?  (Litao Wu, )
  Re: Why so much time difference with a same query/plan?  (Yann Michel, )
   Re: Why so much time difference with a same query/plan?  (Karl Vogel, )
    Re: Why so much time difference with a same query/plan?  (Bruno Wolff III, )

Yann Michel <> writes:

> On Wed, Dec 22, 2004 at 01:52:40PM -0800, Litao Wu wrote:
>> Does the order of columns in the index matter since
>> more than 50% customer_id = 158?
>>
>> I think it does not in Oracle.
>>
>> Will the performance be better if I change index
>> xxx_idx to ("domain", customer_id, created)?
>
> Well, in Oracle this would of cause matter. Oracle calculates index
> usage by being able to fill all index's attributes from the left to the
> right. If any one attribute within is missing Oracle would not test if
> it is only one attribute missing, or if all other attributes are missing
> within the query's where clause.

This depends on the version of Oracle you're using. Oracle 9i
introduced Index Skip Scans:

 http://www.oracle.com/technology//products/oracle9i/daily/apr22.html

I don't know whether pg has something similar?


pgsql-performance by date:

From: Bruno Wolff III
Date:
Subject: Re: Why so much time difference with a same query/plan?
From: amrit@health2.moph.go.th
Date:
Subject: Low Performance for big hospital server ..