Re: Performance on Bulk Insert to Partitioned Table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
Vitalii,

* Vitalii Tymchyshyn (tivv00@xxxxxxxxx) 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

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux