Re: A way to optimize sql about the last temporary-related row

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: A way to optimize sql about the last temporary-related row
Date: 2024-06-27 15:43:47
Message-ID: CANzqJaDP92SxE+y1VpVr1TXfKhJ-DKwTOtNxetwnyL0qs2eWxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 27, 2024 at 11:33 AM agharta82(at)gmail(dot)com <agharta82(at)gmail(dot)com>
wrote:

> Hi,
>
> You are right. Too quickly copy-paste on my part :-)
>
> I take this opportunity to add a NOT insignificant detail.
>
> Before executing the select query I clear the cache:
>
> systemctl stop postgresql-16 && sync && echo 3 > /proc/sys/vm/drop_caches
> && systemctl start postgresql-16
>
> I need to get a performance result even if data is not in cache.
>

In addition to David's suggestion, consider the pg_prewarm extension:
https://www.postgresql.org/docs/current/pgprewarm.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2024-06-27 15:44:37 Re: dblink Future support vs FDW
Previous Message David G. Johnston 2024-06-27 15:33:18 Re: A way to optimize sql about the last temporary-related row