Re: Inefficient query plan

From: Jann Röder <roederja(at)ethz(dot)ch>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Inefficient query plan
Date: 2010-08-23 10:15:43
Message-ID: i4thof$gol$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Am 23.08.10 07:52, schrieb Scott Marlowe:
> Also are a.indexid and b.indexid the same type?
>

You mean ItemID? Fields of the same name are of the same type - so yes.
According to the documentation pgsql adds indexes for primary keys
automatically so (b.itemID, b.indexNumber) is indexed. Or do you think
adding an extra idnex for b.itemID alone will help? If I understand the
documentation correctly, pqSQL can use the first column of a
multi-column index as if it was indexed individually... but maybe I'm
wrong here.

>> I have two tables:
>> A: ItemID (PK), IsssueID (Indexed)
>> B: ItemID (FK), IndexNumber : PK(ItemID, IndexNumber)

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2010-08-23 10:18:02 Re: Inefficient query plan
Previous Message Scott Marlowe 2010-08-23 05:52:50 Re: Inefficient query plan