pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedDoes Postgres 14 have a query cache?
8+ messages / 7 participants
[nested] [flat]
* Does Postgres 14 have a query cache?
@ 2023-02-18 14:46 Siddharth Jain <siddhsql@gmail.com>
2023-02-18 14:54 ` Re: Does Postgres 14 have a query cache? David G. Johnston <david.g.johnston@gmail.com>
2023-02-18 14:59 ` Re: Does Postgres 14 have a query cache? Peter J. Holzer <hjp-pgsql@hjp.at>
2023-02-18 18:43 ` Re: Does Postgres 14 have a query cache? Ron <ronljohnsonjr@gmail.com>
0 siblings, 3 replies; 8+ messages in thread
From: Siddharth Jain @ 2023-02-18 14:46 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
I think the answer is no but wanted to confirm here. this is what my best
friend told me.
[image: image.png]
Attachments:
image.png (image/png, 268.9K) download
view image
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Does Postgres 14 have a query cache?
2023-02-18 14:46 Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
@ 2023-02-18 14:54 ` David G. Johnston <david.g.johnston@gmail.com>
2023-02-18 23:16 ` Re: Does Postgres 14 have a query cache? Tatsuo Ishii <ishii@sraoss.co.jp>
2 siblings, 1 reply; 8+ messages in thread
From: David G. Johnston @ 2023-02-18 14:54 UTC (permalink / raw)
To: Siddharth Jain <siddhsql@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
On Sat, Feb 18, 2023 at 7:47 AM Siddharth Jain <siddhsql@gmail.com> wrote:
> I think the answer is no but wanted to confirm here. this is what my best
> friend told me.
>
> [image: image.png]
>
I find the last paragraph suspect. The rest is basically correct.
David J.
Attachments:
image.png (image/png, 268.9K) download
view image
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Does Postgres 14 have a query cache?
2023-02-18 14:46 Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
2023-02-18 14:54 ` Re: Does Postgres 14 have a query cache? David G. Johnston <david.g.johnston@gmail.com>
@ 2023-02-18 23:16 ` Tatsuo Ishii <ishii@sraoss.co.jp>
0 siblings, 0 replies; 8+ messages in thread
From: Tatsuo Ishii @ 2023-02-18 23:16 UTC (permalink / raw)
To: david.g.johnston@gmail.com; +Cc: siddhsql@gmail.com; pgsql-general@lists.postgresql.org
> On Sat, Feb 18, 2023 at 7:47 AM Siddharth Jain <siddhsql@gmail.com> wrote:
>
>> I think the answer is no but wanted to confirm here. this is what my best
>> friend told me.
>>
>> [image: image.png]
>>
>
> I find the last paragraph suspect. The rest is basically correct.
Yeah. Pgpool-II has query cache but PgBouncer does not.
Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Does Postgres 14 have a query cache?
2023-02-18 14:46 Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
@ 2023-02-18 14:59 ` Peter J. Holzer <hjp-pgsql@hjp.at>
2023-02-18 16:08 ` Re: Does Postgres 14 have a query cache? Christophe Pettus <xof@thebuild.com>
2 siblings, 1 reply; 8+ messages in thread
From: Peter J. Holzer @ 2023-02-18 14:59 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 2023-02-18 06:46:59 -0800, Siddharth Jain wrote:
> I think the answer is no but wanted to confirm here. this is what my best
> friend told me.
>
> image.png
ChatGPT is your best friend?
It is correct. PostgreSQL doesn't have a query cache. I think the reason
is that the use case (the exact same query is submitted repeatedly) is
sufficiently rare that it isn't all that effective in practice.
(The other techniques mentioned are of course also used by other
databases.)
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Does Postgres 14 have a query cache?
2023-02-18 14:46 Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
2023-02-18 14:59 ` Re: Does Postgres 14 have a query cache? Peter J. Holzer <hjp-pgsql@hjp.at>
@ 2023-02-18 16:08 ` Christophe Pettus <xof@thebuild.com>
0 siblings, 0 replies; 8+ messages in thread
From: Christophe Pettus @ 2023-02-18 16:08 UTC (permalink / raw)
To: PostgreSQL <pgsql-general@lists.postgresql.org>; +Cc: Peter J. Holzer <hjp-pgsql@hjp.at>
> On Feb 18, 2023, at 06:59, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
> I think the reason
> is that the use case (the exact same query is submitted repeatedly) is
> sufficiently rare that it isn't all that effective in practice.
And, in this use case, a prepared statement is in effect a cache of the parsing and planning of the query. Detecting identical queries and caching their results while maintaining good invalidation is a much harder problem.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Does Postgres 14 have a query cache?
2023-02-18 14:46 Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
@ 2023-02-18 18:43 ` Ron <ronljohnsonjr@gmail.com>
2023-02-18 18:45 ` Re: Does Postgres 14 have a query cache? Steven Lembark <lembark@wrkhors.com>
2 siblings, 1 reply; 8+ messages in thread
From: Ron @ 2023-02-18 18:43 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
It's got /buffers/. If you frequently query the same lookup tables, they'll
stay in memory...
On 2/18/23 08:46, Siddharth Jain wrote:
> I think the answer is no but wanted to confirm here. this is what my best
> friend told me.
>
> image.png
--
Born in Arizona, moved to Babylonia.
Attachments:
image.png (image/png, 268.9K) download
view image
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Does Postgres 14 have a query cache?
2023-02-18 14:46 Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
2023-02-18 18:43 ` Re: Does Postgres 14 have a query cache? Ron <ronljohnsonjr@gmail.com>
@ 2023-02-18 18:45 ` Steven Lembark <lembark@wrkhors.com>
2023-02-18 18:48 ` Re: Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Steven Lembark @ 2023-02-18 18:45 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org; +Cc: lembark@wrkhors.com
On Sat, 18 Feb 2023 12:43:42 -0600
Ron <ronljohnsonjr@gmail.com> wrote:
> > I think the answer is no but wanted to confirm here. this is what
> > my best friend told me.
There are caches for prepared statements, table rows, indexes.
What about the caches are you interested in?
--
Steven Lembark
Workhorse Computing
lembark@wrkhors.com
+1 888 359 3508
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Does Postgres 14 have a query cache?
2023-02-18 14:46 Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
2023-02-18 18:43 ` Re: Does Postgres 14 have a query cache? Ron <ronljohnsonjr@gmail.com>
2023-02-18 18:45 ` Re: Does Postgres 14 have a query cache? Steven Lembark <lembark@wrkhors.com>
@ 2023-02-18 18:48 ` Siddharth Jain <siddhsql@gmail.com>
0 siblings, 0 replies; 8+ messages in thread
From: Siddharth Jain @ 2023-02-18 18:48 UTC (permalink / raw)
To: Steven Lembark <lembark@wrkhors.com>; +Cc: pgsql-general@lists.postgresql.org
Thanks all for the replies. Just wanted to confirm.
On Sat, Feb 18, 2023 at 10:45 AM Steven Lembark <lembark@wrkhors.com> wrote:
> On Sat, 18 Feb 2023 12:43:42 -0600
> Ron <ronljohnsonjr@gmail.com> wrote:
>
> > > I think the answer is no but wanted to confirm here. this is what
> > > my best friend told me.
>
> There are caches for prepared statements, table rows, indexes.
>
> What about the caches are you interested in?
>
>
> --
> Steven Lembark
> Workhorse Computing
> lembark@wrkhors.com
> +1 888 359 3508
>
>
>
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2023-02-18 23:16 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-18 14:46 Does Postgres 14 have a query cache? Siddharth Jain <siddhsql@gmail.com>
2023-02-18 14:54 ` David G. Johnston <david.g.johnston@gmail.com>
2023-02-18 23:16 ` Tatsuo Ishii <ishii@sraoss.co.jp>
2023-02-18 14:59 ` Peter J. Holzer <hjp-pgsql@hjp.at>
2023-02-18 16:08 ` Christophe Pettus <xof@thebuild.com>
2023-02-18 18:43 ` Ron <ronljohnsonjr@gmail.com>
2023-02-18 18:45 ` Steven Lembark <lembark@wrkhors.com>
2023-02-18 18:48 ` Siddharth Jain <siddhsql@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox