Hello,
new server with more ram will definitely help to keep your working set in memory. But if you want your queries be fast on cold (on disk) data, then you need more/faster disks.
And work_mem = 1000MB is too much, better set to 32MB so you don’t get OOM Killer. And may be slightly lower shared_buffers. Hello,
I cannot do explain (analyze, buffers) since I am on 8.3 postgres version. I am migrating to the new server and upgrading it. Once it is ready again I will post the explain query here. The new disk is SATA disk with 5TB, raid 0 or 1... lspci | grep -i raid 00:1f.2 RAID bus controller: Intel Corporation C600/X79 series chipset SATA RAID Controller (rev 05)
All database is 200GB and the table entity2document2 is
x=> select pg_size_pretty(pg_relation_size('entity2document2')); pg_size_pretty ---------------- 11 GB (1 row)
x=> select pg_size_pretty(pg_total_relation_size('entity2document2')); pg_size_pretty ---------------- 29 GB (1 row)
The index of the name column: x=> select pg_size_pretty(pg_relation_size('entity2document2_name')); pg_size_pretty ---------------- 2550 MB (1 row)
I am tunning the new server with this parameters... shared_buffers = 15000MB work_mem = 1000MB maintenance_work_mem = 2000MB
Any other parameter that should be modified?
Thank you for your help! Andrés
El Mar 10, 2014, a las 9:22 PM, desmodemone escribió: Hello Andres, with enable_bitmapscan=off; could you do :
explain ( analyze , buffers ) select * from entity2document2 where name='ranitidine' ;
I think it's interesting to understand how much it's clustered the table entity2document2. infact the query extract 13512 rows in 79945.362 ms around 4 ms for row, and I suspect the table is not well clustered on that column, so every time the
process is asking for a different page of the table or the i/o system have some problem. Moreover, another point it's : how much it's big ? the rows are arounf 94M , but how much it's big ? it's important the average row length
**NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido.
**CONFIDENTIALITY NOTICE** This email communication and any attachments may contain confidential and privileged information for the sole use of the designated recipient named above. Distribution, reproduction or any other use of this transmission by any party other than the intended recipient is prohibited. If you are not the intended recipient please contact the sender and delete all copies.
|