Hi, answers (and questions) in line here below On 22/09/18 11:19, Vladimir Ryabtsev
wrote:
agree, should not play a role here
Agree, it was pure speculation you cannot drop it since is on a PKEY. You can create 2 partial indexes and the planner will pick it up for you. (and the planning time will go a bit up) > - does the raid controller have a cache?
it is not unusual to have 1GB cache or more... and do not forget to drop the cache between tests + do a sync Sorry I meant the hypervisor OS. Given that the most of the time is on the I/O then caching is maybe playing a role. I tried to reproduce your problem but I cannot go even closer to your results. Everything goes smooth with or without shared buffers, or OS cache. A few questions and considerations came to mind: - how big is your index? - how big is the table? - given the size of shared_buffers, almost 2M blocks should fit, but you say 2 consecutive runs still are hitting the disk. That's strange indeed since you are using way more than 2M blocks. Did you check that perhaps are there any other processes or cronjobs (on postgres and on the system) that are maybe reading data and flushing out the cache? You can make use of pg_buffercache in order to see what is actually cached. That might help to have an overview of the content of it. - As Laurenz suggested (VACUUM FULL), you might want to move data around. You can try also a dump + restore to narrow the problem to data or disk - You might also want to try to see the disk graph of Windows, while you are running your tests. It can show you if data (and good to know how much) is actually fetching from disk or not. regards, fabio pardi |