Re: Hybrid Hash/Nested Loop joins and caching results from subplans

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Hybrid Hash/Nested Loop joins and caching results from subplans
Date: 2020-06-02 09:04:50
Message-ID: CAKU4AWo0H_HrMbmAcpXn4Ws=RYV_J7rBR-QG3jGVgL9qxUJPOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Today I tested the correctness & performance of this patch based on TPC-H
workload, the environment is setup based on [1]. Correctness is tested by
storing the result into another table when this feature is not introduced
and
then enable this feature and comparing the result with the original ones. No
issue is found at this stage.

I also checked the performance gain for TPC-H workload, totally 4 out of
the 22
queries uses this new path, 3 of them are subplan, 1 of them is nestloop.
All of
changes gets a better result. You can check the attachments for reference.
normal.log is the data without this feature, patched.log is the data with
the
feature. The data doesn't show the 10x performance gain, I think that's
mainly
data size related.

At the code level, I mainly checked nestloop path and
cost_resultcache_rescan,
everything looks good to me. I'd like to check the other parts in the
following days.

[1] https://ankane.org/tpc-h

--
Best Regards
Andy Fan

Attachment Content-Type Size
patched.log application/octet-stream 77.3 KB
normal.log application/octet-stream 75.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Антон Пацев 2020-06-02 09:33:33 Re: Proposal: remove string "contains errors; unaffected changes were applied"
Previous Message Peter Eisentraut 2020-06-02 09:04:42 Re: Expand the use of check_canonical_path() for more GUCs