Unix Technical Forum

hacking postgres hashjoin algorithm

This is a discussion on hacking postgres hashjoin algorithm within the pgsql Hackers forums, part of the PostgreSQL category; --> Hello there I am trying to play around with the hashjoin algorithm in postgres. I am using the statement ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 05:20 AM
HS
 
Posts: n/a
Default hacking postgres hashjoin algorithm

Hello there

I am trying to play around with the hashjoin algorithm in postgres.

I am using the statement like
Select count(*) from r,s where r.id=s.id;

I looked at the function ExecHashJoin() in nodeHashjoin.c and cannot
find where the algorithm is comparing if r.id equals s.id

please advise.

Regards
hal
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 05:20 AM
Martijn van Oosterhout
 
Posts: n/a
Default Re: hacking postgres hashjoin algorithm

On Sun, Oct 15, 2006 at 11:08:18PM -0400, HS wrote:
> Hello there
>
> I am trying to play around with the hashjoin algorithm in postgres.
>
> I am using the statement like
> Select count(*) from r,s where r.id=s.id;
>
> I looked at the function ExecHashJoin() in nodeHashjoin.c and cannot
> find where the algorithm is comparing if r.id equals s.id


The code doing the work is actually ExecScanHashBucket() which is in
nodeHash.c. The actual check is done by the ExecQual there...

Hope this helps,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFNPhxIB7bNG8LQkwRAugzAJ4u10BUIOz2/2vLBbaAAY4FuOf/IQCfZkDf
32dX2+r7lcRZ4IpBJJzX9jc=
=PXdk
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 05:25 AM
HS
 
Posts: n/a
Default Re: hacking postgres hashjoin algorithm

from my understanding, postgres first needs to partition the tables.
ExecHashTableCreate() is the function that partitions the tables right?

Martijn van Oosterhout wrote:
> On Sun, Oct 15, 2006 at 11:08:18PM -0400, HS wrote:
>> Hello there
>>
>> I am trying to play around with the hashjoin algorithm in postgres.
>>
>> I am using the statement like
>> Select count(*) from r,s where r.id=s.id;
>>
>> I looked at the function ExecHashJoin() in nodeHashjoin.c and cannot
>> find where the algorithm is comparing if r.id equals s.id

>
> The code doing the work is actually ExecScanHashBucket() which is in
> nodeHash.c. The actual check is done by the ExecQual there...
>
> Hope this helps,

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com