views:

48

answers:

1

I just wanted to know what's the equivalent query in PostgreSQL to MySQL's

SET SESSION query_cache_type = ON SET SESSION query_cache_type = OFF

+3  A: 

No, there isn't. AFAIK (I'm not a PG guru) Postgresql has a very different internal architecture from Mysql and its caching ("shared buffers") works on other level. It does not store query results, but rather the data which is needed to compute those results (query plans and tables, basically).

http://www.postgresql.org/docs/8.4/interactive/runtime-config-resource.html

http://archives.postgresql.org/pgsql-performance/2009-06/msg00286.php

http://www.mail-archive.com/[email protected]/msg109033.html

leonbloy
I *believe* the only time PG caches a query plan is for a prepared statement - which causes a whole other set of issues.
rfusca