David Blasby <dblasby@refractions.net> writes:
> Tom Lane wrote:
>> I'd suggest profiling the backend with both key types to get an idea of
>> where the time is going.
> I've been trying to use gprof to do some profiling, but I'm having
> troubles. Whats the best way to profile?
It's not hard; the only real gotcha is that on Linux systems you need to
compile with -DLINUX_PROFILE so that the postmaster works around some
Linux brain damage with dropping the profile status at fork().
I usually do (in an already configured and built source tree)
cd src/backendmake cleanmake PROFILE="-pg -DLINUX_PROFILE" allmake install-bin
Don't forget that the backends will drop their gmon.out files in
$PGDATA/data/DBOID/gmon.out.
regards, tom lane