Обсуждение: Implementing a join algorithm in Postgres
Hi,
--
I have written a C program which reads from 3 files(Each file is table having 2 columns and thousands of rows).The program is used to join those 3 tables and the algorithm which I have written will work only for those 3 files. Now I want to test this program for postgres. Can someone tell me how to do that, where should I include this program so that I can successfully implement that program in postgres.
PS :- I already posted this query in pgsql-hackers, since I did not get reply there, I am posting this query here.
Thank you.
Regards,
K.Ravikiran
ᐧ
On Fri, Mar 27, 2015 at 5:44 PM, Ravi Kiran <ravi.kolanpaka@gmail.com> wrote:
Hi,I have written a C program which reads from 3 files(Each file is table having 2 columns and thousands of rows).The program is used to join those 3 tables and the algorithm which I have written will work only for those 3 files. Now I want to test this program for postgres. Can someone tell me how to do that, where should I include this program so that I can successfully implement that program in postgres.
Would you kindly elaborate what you wish to do
PS :- I already posted this query in pgsql-hackers, since I did not get reply there, I am posting this query here.Thank you.--Regards,K.Ravikiranᐧ
--
Marcos | I love PHP, Linux, and Java
Hi,
I am actually implementing a Power of two choices Algorithm(A join Algorithm used to join three tables based upon the Triangular query).
So for that I have written a C program which takes input from 3 files(1 file for each table) and will join the three tables. The algorithm is working fine outside(I mean outside postgres).
Now I want the same algorithm(The C program which I have written) to behave as a function in Postgres, I want this algorithm to be called when three particular tables have been joined in the database. I want to know where should I include this algorithm, whether in optimizer or executor, and if possible could you be specific, like in which particular program of optimizer or executor. and finally I want to find the time taken by this algorithm and compare it with Nested loop algorithm.
Thank you.
ᐧ
On Mon, Mar 30, 2015 at 1:05 PM, Marcos Almeida Azevedo <marcos.al.azevedo@gmail.com> wrote:
On Fri, Mar 27, 2015 at 5:44 PM, Ravi Kiran <ravi.kolanpaka@gmail.com> wrote:Hi,I have written a C program which reads from 3 files(Each file is table having 2 columns and thousands of rows).The program is used to join those 3 tables and the algorithm which I have written will work only for those 3 files. Now I want to test this program for postgres. Can someone tell me how to do that, where should I include this program so that I can successfully implement that program in postgres.Would you kindly elaborate what you wish to doPS :- I already posted this query in pgsql-hackers, since I did not get reply there, I am posting this query here.Thank you.--Regards,K.Ravikiranᐧ
--Marcos | I love PHP, Linux, and Java
Regards,
K.Ravikiran
BITS Pilani Hyderabad Campus
On Mon, Mar 30, 2015 at 01:33:57PM +0530, Ravi Kiran wrote: > Hi, > > I am actually implementing a Power of two choices Algorithm(A join Algorithm > used to join three tables based upon the Triangular query). > > So for that I have written a C program which takes input from 3 files(1 file > for each table) and will join the three tables. The algorithm is working fine > outside(I mean outside postgres). > > Now I want the same algorithm(The C program which I have written) to behave as > a function in Postgres, I want this algorithm to be called when three > particular tables have been joined in the database. I want to know where should > I include this algorithm, whether in optimizer or executor, and if possible > could you be specific, like in which particular program of optimizer or > executor. and finally I want to find the time taken by this algorithm and > compare it with Nested loop algorithm. Wow, that is so complex, I am not even sure where to tell you to start. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +