Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdffbbb3

Browse files
committed
Forgot that I had intended to replace division by masking in hash calculation.
1 parent8264cbc commitdffbbb3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/executor/nodeHash.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.89 2005/03/06 22:15:04 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.90 2005/03/13 19:59:40 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -709,7 +709,8 @@ ExecHashGetBucketAndBatch(HashJoinTable hashtable,
709709
if (nbatch>1)
710710
{
711711
*bucketno=hashvalue %nbuckets;
712-
*batchno= (hashvalue /nbuckets) %nbatch;
712+
/* since nbatch is a power of 2, can do MOD by masking */
713+
*batchno= (hashvalue /nbuckets)& (nbatch-1);
713714
}
714715
else
715716
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp