Re: Re: Re: [GENERAL] 回复: postgres cpu 100% need help

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Re: Re: [GENERAL] 回复: postgres cpu 100% need help
Дата
Msg-id 56308742.5070708@hogranch.com
обсуждение исходный текст
Ответ на Re: Re: [GENERAL] 回复: postgres cpu 100% need help  ("657985552@qq.com" <657985552@qq.com>)
Список pgsql-general
On 10/28/2015 12:12 AM, 657985552@qq.com wrote:
Thank you for your reply.
tshow=> explain (analyze, buffers)  select count(t.*)  from tshow.res_room_weight t,tshow.res_room_info r 
tshow->   where t.subcatlg_id=46 
tshow->   and t.roomid = r.actorid
tshow->   and r.levels>=0;

http://explain.depesz.com/s/oKN5

shows where the time is spent in that query, but as you say, that one the timing was fine.    there's a lot of time being spent in a seq_scan of res_room_info.

I would have written that query as the inner join it is, but that probably won't effect how it's executed.

select ... from tshow.res_room_weight t join tshow.res_room_info r on (t.roomid = r.actorid) where  t.subcatlg_id=46 and r.levels>=0;


-- 
john r pierce, recycling bits in santa cruz

В списке pgsql-general по дате отправления:

Предыдущее
От: "657985552@qq.com"
Дата:
Сообщение: Re: Re: [GENERAL] 回复: postgres cpu 100% need help
Следующее
От: "657985552@qq.com"
Дата:
Сообщение: Re: Re: [GENERAL] Re: Re: [GENERAL] 回复: postgres cpu 100% need help