Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT

От: Tom Lane
Тема: Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT
Дата: ,
Msg-id: 14012.1291443654@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos)
Ответы: Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos)
Список: pgsql-performance

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

Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos, )
 Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Tom Lane, )
  Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos, )
   Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Tom Lane, )
    Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos, )
     Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Tom Lane, )
      Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Mladen Gogala, )
       Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Jochen Erwied, )
        Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos, )
       Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos, )
      Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos, )
       Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Tom Lane, )
        Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Tom Lane, )
         Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos, )
          Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Tom Lane, )
           Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (John Papandriopoulos, )
    Re: Query-plan for partitioned UPDATE/DELETE slow and swaps vmem compared to SELECT  (Mladen Gogala, )

John Papandriopoulos <> writes:
> I've found that a k-ary table inheritance tree works quite well to
> reduce the O(n) CHECK constraint overhead [1] in the query planner
> when enabling partition constraint exclusion.

Um ... you mean you're creating intermediate child tables for no reason
except to reduce the number of direct descendants of any one table?
That's an utter waste of time, because the first thing the planner will
do with an inheritance tree is flatten it.  Just create *one* parent
table and make all the leaf tables direct children of it.

> My machine swaps wildly when PostgreSQL plans an UPDATE or DELETE.

This is a strong hint that you've got way too many child tables.

            regards, tom lane


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

От: Mathieu De Zutter
Дата:
Сообщение: Slow query to get last created row using CURRVAL
От: Marti Raudsepp
Дата:
Сообщение: Re: Slow query to get last created row using CURRVAL