Re: EXTERNAL storage and substring on long strings

От: Tom Lane
Тема: Re: EXTERNAL storage and substring on long strings
Дата: ,
Msg-id: 19022.1059685091@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: EXTERNAL storage and substring on long strings  (Scott Cain)
Список: pgsql-performance

Скрыть дерево обсуждения

EXTERNAL storage and substring on long strings  (Scott Cain, )
 Re: EXTERNAL storage and substring on long strings  (Scott Cain, )
  Re: EXTERNAL storage and substring on long strings  (Tom Lane, )
  Re: EXTERNAL storage and substring on long strings  (Joe Conway, )
 Re: EXTERNAL storage and substring on long strings  (Scott Cain, )
  Re: EXTERNAL storage and substring on long strings  (Tom Lane, )
 Re: EXTERNAL storage and substring on long strings  (Joe Conway, )
  Re: EXTERNAL storage and substring on long strings  (Ron Johnson, )
   Re: EXTERNAL storage and substring on long strings  (Scott Cain, )
    Re: [SQL] EXTERNAL storage and substring on long strings  (Tom Lane, )
     Re: [SQL] EXTERNAL storage and substring on long strings  (Scott Cain, )
      Re: [SQL] EXTERNAL storage and substring on long strings  (Joe Conway, )
       Re: [SQL] EXTERNAL storage and substring on long strings  (Scott Cain, )
        Re: [SQL] EXTERNAL storage and substring on long strings  (Scott Cain, )
         Re: [SQL] EXTERNAL storage and substring on long strings  (Joe Conway, )
     Re: [SQL] EXTERNAL storage and substring on long strings  (Jan Wieck, )
      Re: [SQL] EXTERNAL storage and substring on long strings  (Tom Lane, )
       Re: [SQL] EXTERNAL storage and substring on long strings  (Scott Cain, )
       Re: [SQL] EXTERNAL storage and substring on long strings  (Jan Wieck, )
    Re: [SQL] EXTERNAL storage and substring on long strings  (Richard Huxton, )
     Re: [SQL] EXTERNAL storage and substring on long strings  (Scott Cain, )
      Re: [SQL] EXTERNAL storage and substring on long strings  ("Shridhar Daithankar", )
      Re: [SQL] EXTERNAL storage and substring on long strings  ("Matt Clark", )
  Re: EXTERNAL storage and substring on long strings  (Scott Cain, )
 Re: EXTERNAL storage and substring on long strings  (Tom Lane, )
 Re: EXTERNAL storage and substring on long strings  (Joe Conway, )
  Re: EXTERNAL storage and substring on long strings  (Scott Cain, )
 Re: EXTERNAL storage and substring on long strings  (Tom Lane, )
  Re: EXTERNAL storage and substring on long strings  (Joe Conway, )
   Re: EXTERNAL storage and substring on long strings  (Tom Lane, )
    Re: EXTERNAL storage and substring on long strings  (Scott Cain, )

Scott Cain <> 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


В списке pgsql-performance по дате сообщения:

От: Scott Cain
Дата:
Сообщение: Re: EXTERNAL storage and substring on long strings
От: Rajesh Kumar Mallah
Дата:
Сообщение: Re: Views With Unions