Re: Query not using index

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: ryan(at)paymentalliance(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query not using index
Date: 2001-05-10 18:13:46
Message-ID: Pine.BSF.4.21.0105101112500.92606-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Have you vacuum analyzed recently and what does
explain show for the query?

On Thu, 10 May 2001 ryan(at)paymentalliance(dot)net wrote:

> Here's the query:
>
> SELECT
> cart_row_id
> FROM
> pa_shopping_cart
> WHERE
> order_id = 20;
> [ ... ]
> There is an index on:
> just order_id
> just order_id and cart_row_id
> and a PK on cart row_id
>
> I don't understand why it's not using one of these indexes!
> Please post your responses to the group - my email is down.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Wheeler 2001-05-10 18:18:56 Custom Constraint
Previous Message Thomas F. O'Connell 2001-05-10 18:11:33 trigger sub-functions