From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Scott Cain <cain(at)cshl(dot)org> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: EXTERNAL storage and substring on long strings |
Date: | 2003-07-31 20:58:11 |
Message-ID: | 19022.1059685091@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance pgsql-sql |
Scott Cain <cain(at)cshl(dot)org> writes:
> I see, encoding is a per database option. Since I've never set it, all
> my databases use sql_ascii.
Okay, then you've dodged the obvious bullet; time to try profiling I
guess. The way I usually do it is (given a clean, configured source
tree):
cd src/backend
gmake PROFILE="-pg -DLINUX_PROFILE" all
install resulting postgres executable
(The -DLINUX_PROFILE is unnecessary on non-Linux machines, but AFAIK it
won't hurt anything either.) Once you have this installed, each session
will end by dumping a gmon.out profile file into the $PGDATA/base/nnn
directory for its database. After you've done a test run, you do
gprof path/to/postgres/executable path/to/gmon.out >outputfile
and voila, you have a profile.
It's a good idea to make sure that you accumulate a fair amount of CPU
time in a test session, since the profile depends on statistical
sampling. I like to have about a minute of accumulated runtime before
trusting the results. Repeat the same query multiple times if needed.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2003-07-31 20:59:21 | Re: Odd explain estimate |
Previous Message | Joe Conway | 2003-07-31 20:49:33 | Re: EXTERNAL storage and substring on long strings |
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2003-07-31 21:03:05 | Re: EXTERNAL storage and substring on long strings |
Previous Message | Joe Conway | 2003-07-31 20:49:33 | Re: EXTERNAL storage and substring on long strings |