tem sim
isso e feito no postgresql.conf
 
Da o mail e grande mas de uma olhadinha belezA? depois reporte algo se vc implementou e se melhorou algo em performance
 
 
Sort Memory Batch Size
Another tuning parameter is the amount of memory used for sort batches. When sorting large tables or results,
POSTGRESQL will sort them in parts, placing intermediate results in temporary les. These les are then merged
and resorted until all rows are sorted. Increasing the batch size creates fewer temporary les and often allows faster
sorting. However, if the sort batches are too large, they cause pageins because parts of the sort batch get paged out to
swap during sorting. In these cases, it is much faster to use smaller sort batches and more temporary les, so again,
swap pageins determine when too much memory has been allocated. Keep in mind this parameter is used for every
backend performing a sort, either for ORDER BY, CREATE INDEX, or for a merge join. Several simultaneous sorts will use
several times this amount of memory.
This value can be changed using a postmaster command-line ag or by changing the value of sort_mem in postgresql.
conf.
 
Cache Size and Sort Size
Both cache size and sort size affect memory usage, so you cannot maximize one without affecting the other. Keep
in mind that cache size is allocated on postmaster startup, while sort size varies depending on the number of sorts
being performed. Generally, cache size is more signi cant than sort size. However, certain queries that use ORDER BY,
CREATE INDEX, or merge joins may see speedups with larger sort batch sizes.
Also, many operating systems limit how much shared memory can be allocated. Increasing this limit requires
operating system-speci c knowledge to either recompile or recon gure the kernel. More information can be found in
the POSTGRESQL administrators guide, http://developer.postgresql.org/docs/postgres/kernel-resources.html.
As a start for tuning, use 25% of RAM for cache size, and 2-4% for sort size. Increase if no swapping, and decrease
to prevent swapping. Of course, if the frequently accessed tables already t in the cache, continuing to increase the
cache size no longer dramatically improves performance.
Fonte: postgresql tunning
 
isso e no postgresql.conf

WORK_MEM

Default Value:

1024 kilobytes (1MB)

Modify Time:

SET command

Override:

None


When PostgreSQL processes a query, it transforms the query from string form into an execution plan. An execution plan is a sequence of operations that must be performed in order to satisfy the query. A typical execution plan might include steps to scan through an entire table and sort the results. If an execution plan includes a Sort or Hash operation, PostgreSQL can use two different algorithm families to perform the sort (or hash). If the amount of memory required to perform the sort (or hash) exceeds WORK_MEM KB, PostgreSQL will switch from an in-memory algorithm to a more expensive, disk-based algorithm. You can adjust WORK_MEM on a per-command basis using the command SET WORK_MEM TO maximum_memory.

This parameter was named SORT_MEM prior to PostgreSQL release 8.0.

fonte: postgresql comprehensive guide to ......

----- Original Message -----
Sent: Thursday, March 30, 2006 9:21 PM
Subject: [PostgreSQL-Brasil] Area de sort

  Nao sei se essa pergunta ja foi feita na lista, mas preciso saber se no postgres tem como configurar a area de sort. Eu sei que no oracle tem como definir o arquivo (tamanho e localizacao fisica) utilizado como area de sort. Nao encontrei nada semelhante no postgres. Se algum puder me ajudar eu agradeco.
 
Matheus


_______________________________________________
Grupo de Usuários do PostgreSQL no Brasil
http://www.postgresql.org.br
_______________________________________________
Grupo de Usuários do PostgreSQL no Brasil
http://www.postgresql.org.br

Responder a