Re: Speed up Hash Join by teaching ExprState about hashing

Поиск
Список
Период
Сортировка
От Tels
Тема Re: Speed up Hash Join by teaching ExprState about hashing
Дата
Msg-id 527bc1b5de6345c9fb34b6a8d76b6eb7@bloodgate.com
обсуждение исходный текст
Ответ на Speed up Hash Join by teaching ExprState about hashing  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
Hello David,

you wrote:

> v4 patch attached. If nobody else wants to look at this then I'm 
> planning on pushing it soon.

Had a very brief look at this bit caught my attentioon:

+        EEO_CASE(EEOP_HASHDATUM_NEXT32_STRICT)
+        {
+            FunctionCallInfo fcinfo = op->d.hashdatum.fcinfo_data;
+            uint32        existing_hash = DatumGetUInt32(*op->resvalue);
+            uint32        hashvalue;
+
+            /* combine successive hash values by rotating */
+            existing_hash = pg_rotate_left32(existing_hash, 1);
+
+            if (fcinfo->args[0].isnull)
+            {

Is it nec. to rotate existing_hash here before checking for isnull? 
Because in case of isnull, isn't the result of the rotate thrown away?

Or in other words, mnaybe this bit here can be moved to after the isnull 
check:

+            /* combine successive hash values by rotating */
+            existing_hash = pg_rotate_left32(existing_hash, 1);

-- 
Best regards,

Tels



В списке pgsql-hackers по дате отправления: