Re: Performance Evaluation of Result Cache by using TPC-DS

From: Yuya Watari <watari(dot)yuya(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Performance Evaluation of Result Cache by using TPC-DS
Date: 2021-05-12 05:08:20
Message-ID: CAJ2pMkbX1GyqQBQa6ZAjbW46tuWo=Rx1Qw9+v4XxB+N2=+Ppqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello David,

Thank you for your reply.

> That's certainly one side of it. On the other side, it's pretty
> important to also note that in 4 of 23 queries the result cache plan
> executed faster but the planner costed it as more expensive.
>
> I'm not saying the costing is perfect, but what I am saying is, as you
> noted above, in 5 of 23 queries the result cache was cheaper and
> slower, and, as I just noted, in 4 of 23 queries, result cache was
> more expensive and faster. We know that costing is never going to be
> a perfect representation of what the execution time will be However,
> in these examples, we've just happened to get quite a good balance. If
> we add a penalty to result cache then it'll just subtract from one
> problem group and add to the other.
>
> Overall, in my tests execution was 1.15% faster with result cache
> enabled than it was without.

Thank you for your analysis. I agree with your opinion.

> I think it is more likely to be concerns like that one which would
> cause us to default enable_resultcache to off.

I am not sure whether this kind of degradation is common, but setting
default behavior to off is one of the realistic solutions.

Best regards,
Yuya Watari

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2021-05-12 05:15:38 Re: Asynchronous Append on postgres_fdw nodes.
Previous Message Tom Lane 2021-05-12 04:49:11 Re: Replication slot stats misgivings