Re: [PERFORM] Query taking long time

2014-03-11 Thread Evgeny Shishkin
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 sh

Re: [PERFORM] Ye olde slow query

2014-03-11 Thread Tom Lane
"Murphy, Kevin" writes: > Synopsis: 8-table join with one "WHERE foo IN (...)" condition; works OK with > fewer > than 5 items in the IN list, but at N=5, the planner starts using a compound > index > for the first time that completely kills performance (5-6 minutes versus 0-12 > seconds). > I

[PERFORM] Ye olde slow query

2014-03-11 Thread Murphy, Kevin
Synopsis: 8-table join with one "WHERE foo IN (...)" condition; works OK with fewer than 5 items in the IN list, but at N=5, the planner starts using a compound index for the first time that completely kills performance (5-6 minutes versus 0-12 seconds). I'm interested in learning what plays a

Re: [PERFORM] Query taking long time

2014-03-11 Thread acanada
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