|
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 signicant 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-specic knowledge to either recompile or recongure 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
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 ......
| ||||||||
_______________________________________________ Grupo de Usuários do PostgreSQL no Brasil http://www.postgresql.org.br
