Tom Lane escreveu:
>Luiz Gonzaga da Mata <gonzaga@pbh.gov.br> writes:
>
>
>> Although to have changed they sort_mem/work_mem it for 1 MB, it did not
>>use this area in available memory for the connection to make the
>>creation of the temporary table.
>>
>>
>
>Why would you expect it to, and why would you think there is any
>advantage? A small, short-lived temp table will probably never actually
>be spilled to disk by the kernel (we never fsync them) so the actual
>performance improvement would be minimal.
>
>
>
It can be that kernel not writing physically in disk, but can be also
that write.
If the use to order by, distinct, creating index and other temporary
resources is to greater then it sort_mem/work_mem per processes, the
creating resource in disk can be used.
If to create a concept of work_mem_pool internally, we could optimize
the resources of SO X SGDB and and the use most rational of resource..
For the administrator of the operational system and the administrator of
the SGDB that is very important.
Work_mem_pool = (number of connections->postgresql.conf) X
(work_mem->postgresql.conf).
If *memory real used* for all the user processes will be minor who
work_mem_pool, would use more resources in memory of that simply the
value of work_mem individual.
The general behavior of the PostgreSQL would be very better.
regards,
Luiz Gonzaga da Mata