Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8264cbc commit dffbbb3Copy full SHA for dffbbb3
src/backend/executor/nodeHash.c
@@ -8,7 +8,7 @@
8
*
9
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.89 2005/03/06 22:15:04 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeHash.c,v 1.90 2005/03/13 19:59:40 tgl Exp $
12
13
*-------------------------------------------------------------------------
14
*/
@@ -709,7 +709,8 @@ ExecHashGetBucketAndBatch(HashJoinTable hashtable,
709
if (nbatch > 1)
710
{
711
*bucketno = hashvalue % nbuckets;
712
- *batchno = (hashvalue / nbuckets) % nbatch;
+ /* since nbatch is a power of 2, can do MOD by masking */
713
+ *batchno = (hashvalue / nbuckets) & (nbatch - 1);
714
}
715
else
716
0 commit comments