Re: Performance on Bulk Insert to Partitioned Table

From: Vitalii Tymchyshyn <tivv00(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Charles Gomes <charlesrg(at)outlook(dot)com>, Ondrej Ivanič <ondrej(dot)ivanic(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance on Bulk Insert to Partitioned Table
Date: 2012-12-28 13:18:38
Message-ID: CABWW-d25EyTzez=AbxB=kn+1w8aZOuh51-GLqWLBGNmRAizEtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Why so? Basic form "case lvalue when rvalue then out ... end" is much like
switch.
The "case when condition then out ... end" is different, more complex
beast, but first one is essentially a switch. If it is now trnasformed into
"case when lvalue = rvalue1 then out1 when lvalue=rvalue2 then out2 ...
end" then this can be optimized and this would benefit many users, not only
ones that use partitioning.

2012/12/28 Stephen Frost <sfrost(at)snowman(dot)net>

> Vitalii,
>
> * Vitalii Tymchyshyn (tivv00(at)gmail(dot)com) wrote:
> > There is switch-like sql case:
> [...]
> > It should work like C switch statement.
>
> It does and it doesn't. It behaves generally like a C switch statement,
> but is much more flexible and therefore can't be optimized like a C
> switch statement can be.
>
> Thanks,
>
> Stephen
>

--
Best regards,
Vitalii Tymchyshyn

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2012-12-28 13:25:41 Re: Performance on Bulk Insert to Partitioned Table
Previous Message Pavel Stehule 2012-12-28 12:48:19 Re: Performance on Bulk Insert to Partitioned Table