Re: postgres optimizer

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Hossein S(dot) Attar" <mhsheikh(at)softbase(dot)math(dot)uwaterloo(dot)ca>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgres optimizer
Date: 2005-08-26 16:36:16
Message-ID: 430F4500.4040907@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> "Hossein S. Attar" <mhsheikh(at)softbase(dot)math(dot)uwaterloo(dot)ca> writes:
>
>>I am working on postgres optimizer code to add some statistics
>>collection features for an academic project. At some point in my work, I
>>need to be able to tell if a join is a foreign key join or not. Also in
>>case of a foreign key join, I need to identify which input to the join
>>operator has the primary key attribute and which one has teh foreign
>>key. In other words, when we are making a JoinPath struct, I need to
>>identify if the join between the inner and outer RelOptInfo structs is a
>>foreign key join and if so, which RelOptInfo has the primary key. Does
>>anyone know the best way to do this? Should I go to "joinrestrictinfo"
>>field and go over all expressions? Is there any easier way?

I would be interested in knowing "why" you want to do such a thing? What
is it you expect to gain?

Sincerely,

Joshua D. Drake

>
>
> The planner doesn't think there is any such thing as a "foreign key
> join". Perhaps you should modify the foreign key triggers (in
> ri_triggers.c) to collect the information you need.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew T. O'Connor 2005-08-26 16:37:37 Re: Is there going to be a 8.1 beta for win32?
Previous Message Joshua D. Drake 2005-08-26 16:33:25 Re: bytea or large objects?