Re: postgres 7.4 at 100%

От: Gavin M. Roy
Тема: Re: postgres 7.4 at 100%
Дата: ,
Msg-id: 40E192CC.90707@ehpg.net
(см: обсуждение, исходный текст)
Ответ на: Re: postgres 7.4 at 100%  (Chris Cheston)
Ответы: Re: postgres 7.4 at 100%  (Chris Cheston)
Список: pgsql-performance

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

postgres 7.4 at 100%  (Chris Cheston, )
 Re: postgres 7.4 at 100%  (Richard Huxton, )
  Re: postgres 7.4 at 100%  (Chris Cheston, )
 Re: postgres 7.4 at 100%  (Doug McNaught, )
  Re: postgres 7.4 at 100%  ("Joshua D. Drake", )
   Re: postgres 7.4 at 100%  (Chris Cheston, )
    Re: postgres 7.4 at 100%  (Christopher Kings-Lynne, )
     Re: postgres 7.4 at 100%  (Frank Knobbe, )
      Re: postgres 7.4 at 100%  (Tom Lane, )
       Re: postgres 7.4 at 100%  (Josh Berkus, )
        Re: postgres 7.4 at 100%  (Chris Cheston, )
         Re: postgres 7.4 at 100%  (Christopher Kings-Lynne, )
          Re: postgres 7.4 at 100%  (Chris Cheston, )
           Re: postgres 7.4 at 100%  (Bruno Wolff III, )
           Re: postgres 7.4 at 100%  ("Gavin M. Roy", )
            Re: postgres 7.4 at 100%  (Chris Cheston, )
             Re: postgres 7.4 at 100%  (Christopher Kings-Lynne, )
              Re: postgres 7.4 at 100%  (Chris Cheston, )
               Re: postgres 7.4 at 100%  (Christopher Kings-Lynne, )
         Re: postgres 7.4 at 100%  (Tom Lane, )
      Re: postgres 7.4 at 100%  (Josh Berkus, )
       Re: postgres 7.4 at 100%  (Frank Knobbe, )
        Re: postgres 7.4 at 100%  (Josh Berkus, )
 Re: postgres 7.4 at 100%  (Duane Lee - EGOVX, )

Is the from field nullable?  If not, try "create index calllogs_from on
calllogs ( from );" and then do an explain analyze of your query.

Gavin


Chris Cheston wrote:

>ok i just vacuumed it and it's taking slightly longer now to execute
>(only about 8 ms longer, to around 701 ms).
>
>Not using indexes for calllogs(from)... should I?  The values for
>calllogs(from) are not unique (sorry if I'm misunderstanding your
>point).
>
>Thanks,
>
>Chris
>
>On Tue, 29 Jun 2004 16:21:01 +0800, Christopher Kings-Lynne
><> wrote:
>
>
>>>live=# explain analyze SELECT id FROM calllogs WHERE from = 'you';
>>>                                                QUERY PLAN
>>>----------------------------------------------------------------------------------------------------------
>>> Seq Scan on calllogs  (cost=0.00..136.11 rows=24 width=4) (actual
>>>time=0.30..574.72 rows=143485 loops=1)
>>>   Filter: (from = 'you'::character varying)
>>> Total runtime: 676.24 msec
>>>(3 rows)
>>>
>>>
>>Have you got an index on calllogs(from)?
>>
>>Have you vacuumed and analyzed that table recently?
>>
>>Chris
>>
>>
>>
>>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to )
>
>



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

От: Bruno Wolff III
Дата:
Сообщение: Re: Query performance
От: "Scott Marlowe"
Дата:
Сообщение: Re: High load average with PostgreSQL 7.4.2 on