On 2/1/07, Achilleas Mantzios <achill@xxxxxxxxxxxxxxxxxxxxx> wrote:
> I would like to know if Postgres has shared memory like Library Cache > (avoid to do parse the same sql), Dictionary Cache (metadata > information), Sort Area and so on? Yes, PostgreSQL makes use of SYSV IPC shared mem and semaphores.
That's not the question that was asked though. The correct answer is no, PostgreSQL does not have a global statement caching subsystem like Oracle's Library Cache. The majority of PostgreSQL caches are backend-local... which means that each backend maintains its own cache. PostgreSQL has no algorithms similar to a hard, soft, or soft-soft parse; it's all hard parsing in PostgreSQL unless you explicitly prepare a statement. Keep in mind that, once your session is terminated, so is all of your cache data (including prepared statements). This isn't too much of an issue on a connection-pooled system, but if you have lots of client/server activity, you'll want to make sure you use prepared statements.
> Oracle has this structures. And Postgres? > I couldn't find anything about memory on Postgres.
PostgreSQL uses shared memory, but it's primarily for the buffer cache and some shared variables. -- Jonah H. Harris, Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 33 Wood Ave S, 3rd Floor | jharris@xxxxxxxxxxxxxxxx Iselin, New Jersey 08830 | http://www.enterprisedb.com/