[HACKERS] creating a Plan...
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. (Its 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 !!!
[HACKERS] Bitmapset data type???
Hi all, I'm tring to understand a part of code of postgres and I saw a line like this: bms_is_subset(restrictinfo-right_relids,outerrelids) (createplan.c, function get_switched_clauses() at ~/src/backend/optimizer/plan). I don't understand the data types of the the arguments of that function. The datatype of those arguments is Bitmapset, i.e. typedef struct Bitmapset { int nwords; bitmapword words[1]; }Bitmapset; (bitmapset.h at ~/src/include/nodes) and bitmapword is: typedef unit32 bitmapword; (bitmapset.h at ~/src/include/nodes) and the prototype of the function is: extern bool bms_is_subset(const Bitmapset *a, const Bitmapset *b); (bitmapset.h at ~/src/include/nodes) The following is at the file bitmapset.h at dir ~/src/include/nodes) A bitmap set can represent any set of nonnegative integers, although it is mainly intented for sets where the maximum value is not large, say at most a few hundred.By convention, a NULL pointer is always accepted by all operations to represent the empty set.(But beware that this is not the only representation of the empty set. Use bms_is_empty() in preference to testing for NULL.) Can someone explain to me please the datatype Bitmapset? I'm confused. Thanks in advance!!! - martha ---(end of broadcast)--- TIP 8: explain analyze is your friend
[HACKERS] adding and compiling new code
Hi all I've just started writing code to PostgreSQL 7.4.2 and I wand to recompile the new source code that I added in some .c files. I suspect that there must be a quicker way to compile those files than executing the commands: ./configure, gmake, gmake install... . Could I use only some Makefiles (the correspodent ones) that there are in each directory? If yes, how should I use them? Thanks, regards Martha ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[HACKERS] implementing another hash join...
Hi, Im new to postgres and I'm about to implement the algorithm double pipelined hash join. I've started using SPI functions but soon I realised that I 'm not at the right way (am I?). Is there a way that I'm not obliged to change code of the optimizer of postgres but to write a seperate code as a new function?I've been told by my supervisor that I should use the function that is doing the hashing of a relation. There is a chaos Please help!!I'm reading the documentation of postgres and some '.c .h' files (mainly the createplan.c at the directory ~/src/backend/optimizer/plan/) to figer out what to do and from where to start. Regards Martha ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly