On 08.10.2012 12:15, Craig Ringer wrote: > On 10/08/2012 04:18 PM, Andrzej Zawadzki wrote: >> Hi! >> >> After upgrade (dump/restore/analyze) query (below) after some time is >> killed by kernel. > > What's `shared_buffers`? `work_mem`? shared_buffers = 64MB work_mem = 48MB effective_cache_size = 512MB Nothing changed. Config is pretty much similar. I noticed the correctness: when table verification_waiting_credit does not contain any record of user_id = 'value' then query execute very fast. > > https://wiki.postgresql.org/wiki/Server_Configuration > > https://wiki.postgresql.org/wiki/Slow_Query_Questions I understand but server is the same - KVM image. Postgresql engine is different. Table kredyty is big - contains ~3M records. verification_waiting_credit is small - ~40 records. Do you need schemas? I don't know if I can post here... :-( -- Andrzej Zawadzki -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance