Re: GiST index performance - Mailing list pgsql-performance

From Tom Lane
Subject Re: GiST index performance
Date
Msg-id 7684.1244652691@sss.pgh.pa.us
Whole thread Raw
In response to Re: GiST index performance  (Matthew Wakeling <matthew@flymine.org>)
Responses Re: GiST index performance
List pgsql-performance
Matthew Wakeling <matthew@flymine.org> writes:
> The final cumulative time is 5894.06 seconds, which doesn't seem to match
> the query run time at all.

Depending on the platform you're using, gprof might have the wrong idea
about the kernel's tick rate, leading to its numbers being some multiple
or fraction of the true elapsed time.  I had that problem awhile back
https://bugzilla.redhat.com/show_bug.cgi?id=151763
although I'd like to think it's fixed on all recent Linuxen.  However,
your bigger problem is here:

> Also, no calls to anything including "bioseg"
> in the name are recorded, although they are definitely called as the GiST
> support functions for that data type.

I have never had any success in getting gprof to profile functions that
are in loadable libraries, which of course is exactly what you need to do
here.  I have found hints on the web claiming that it's possible, but
they don't work for me.  gprof just ignores both the functions and the
time spent in them.

Personally I generally use oprofile these days, because it doesn't have
that problem and also doesn't require any special build options.  If you
don't have that available to you, the best bet is probably to make a
test build of Postgres in which your functions are linked directly into
the main postgres executable.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Looking for installations with a large number of concurrent users
Next
From: Tom Lane
Date:
Subject: Re: Why is my stats collector so busy?