On Sat, 2005-02-05 at 14:42 -0500, Tom Lane wrote: > Marinos Yannikos <[EMAIL PROTECTED]> writes: > > Some more things I tried: > > You might try the attached patch (which I just applied to HEAD). > It cuts down the number of acquisitions of the BufMgrLock by merging > adjacent bufmgr calls during a GIST index search.
I'm not sure it will help much either, but there is more low-hanging fruit in this area: GiST currently does a ReadBuffer() for each tuple produced by the index scan, which is grossly inefficient. I recently applied a patch to change rtree to keep a pin on the scan's current buffer in between invocations of the index scan API (which is how btree and hash already work), and it improved performance by about 10% (according to contrib/rtree_gist's benchmark). I've made similar changes for GiST, but unfortunately it is part of a larger GiST improvement patch that I haven't had a chance to commit to 8.1 yet: http://archives.postgresql.org/pgsql-patches/2004-11/msg00144.php I'll try and get this cleaned up for application to HEAD next week. -Neil ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq