creating a Plan...

From: Martha Chronopoulou <mchron(at)aueb(dot)gr>
To: pgsql-hackers(at)postgresql(dot)org
Subject: creating a Plan...
Date: 2005-01-05 03:25:46
Message-ID: 41DB5E3A.5090103@aueb.gr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all
best wishes, and happy new year !!!!! :) :)

I implement a new type of join called "Double Pipelined Hash Join". This
type of join requires 2 hash tables; one for the left (outer) and one
for the right(inner) relation. At the execution phase one (or more)
tuple(s) from the inner relation must probe the hash table of the outer
relation and one (or more) tuple(s) from the outer relation must probe
the hash table of the inner relation. Let's make the assumption that the
sequence of this selection of the tuples from the inner or the outer
relation, happens in a random manner. (It's obvious that there are many
details that I don't mention here; if there is a problem with this,
please tell)
Those days I create the plan that later on must be executed. The problem
I have is that I don't know whether I should create two more paths
(inner and outer), that is to add two more fields to the struct Plan, so
as to be able later, at the execution phase to access each relation
tuple by tuple, and through a hash table any time I want.(is it
necessary to add those plan nodes? should I create only 2 Hash nodes
without adding anything else?)

(i.e. ..
typedef struct Plan // plannodes.h
{
NodeTag type;
....
....
struct Plan *rigthtree; // for access tuple by tuple
struct Plan *lefttree; //for access tuple by tuple
struct Plan *rigthtreeHash; //for probing the hash table
struct Plan *lefttreeHash; //for probing the hash table
....
....
)Plan;

(The truth is that I'm thinking only the simple case where there is one
simple Join. I suspect that in other cases, things may be different.)
If there is something that is not clear, please let me know, so as to
give more info.
Thanks in advance !!!!!!!!!!!!!!!

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2005-01-05 04:38:00 Re: [pgsql-ru-general] [HACKERS] Final call for translation updates
Previous Message Ron Mayer 2005-01-04 23:10:51 Re: PostgreSQL 8.0.0 Release Candidate 3