Re: High CPU usage after partitioning

От: Andrew Dunstan
Тема: Re: High CPU usage after partitioning
Дата: ,
Msg-id: 50FEA640.10201@dunslane.net
(см: обсуждение, исходный текст)
Ответ на: Re: High CPU usage after partitioning  (rudi)
Ответы: Re: High CPU usage after partitioning  (rudi)
Re: High CPU usage after partitioning  (Tom Lane)
Список: pgsql-performance

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

High CPU usage after partitioning  (rudi, )
 Analyze and default_statistics_target  (AJ Weber, )
  Re: Analyze and default_statistics_target  (Heikki Linnakangas, )
  Re: Analyze and default_statistics_target  (Albe Laurenz, )
 Re: High CPU usage after partitioning  (Merlin Moncure, )
 Re: High CPU usage after partitioning  ("Kevin Grittner", )
 Re: High CPU usage after partitioning  (Andrew Dunstan, )
  Re: High CPU usage after partitioning  (rudi, )
   Re: High CPU usage after partitioning  (Merlin Moncure, )
    Re: High CPU usage after partitioning  (rudi, )
     Re: High CPU usage after partitioning  (Andrew Dunstan, )
      Re: High CPU usage after partitioning  (rudi, )
       Re: High CPU usage after partitioning  (Igor Neyman, )
      Re: High CPU usage after partitioning  (Tom Lane, )

On 01/22/2013 09:21 AM, rudi wrote:
> On Tue, Jan 22, 2013 at 3:04 PM, Merlin Moncure <
> <mailto:>> wrote:
>
>     let's see the query -- it's probably written in such a way so as to
>     not be able to be optimized through CE.
>
>
> The query is pretty simple and standard, the behaviour (and the plan)
> is totally different when it comes to a partitioned table.
>
> Partioned table query => explain analyze SELECT  "sb_logs".* FROM
> "sb_logs"  WHERE (device_id = 901 AND date_taken = (SELECT
> MAX(date_taken) FROM sb_logs WHERE device_id = 901));
>

And there you have it. Constraint exclusion does not work in cases like
this. It only works with static expressions (such as a literal date in
this case).

cheers

andrew



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

От: Tom Lane
Дата:
Сообщение: Re: High CPU usage after partitioning
От: Виктор Егоров
Дата:
Сообщение: Effect of the WindowAgg on the Nested Loop