Hi Oleg, thanks for your quick reply! Oleg Bartunov wrote: > you cache is too low :) Try to increase shared_buffers, for example, > for 2Gb I'd set it to 100,000 Ok, I set shared_buffers to 100000 and indeed it makes a big difference. Other queries than the ones I mentioned are faster, too. Thanks very much for your help, - Stephan