Обсуждение: 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
Martha Chronopoulou <mchron@aueb.gr> writes:
> 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?).
Not even close. You need to be implementing new executor node types
(see backend/executor) and teaching the planner about the properties
of this join method. SPI is at a completely different level of
abstraction ...
> Is there a way that I'm not obliged to change code of the optimizer of
> postgres
Nope. The set of join types it knows about is pretty much hard-wired.
regards, tom lane