Search Postgresql Archives

Feature request: pgsql's CASE...WHEN optimization

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

 



Hi.

I think that in specific statement with many constants:

CASE x
  WHEN const1 THEN action1
  WHEN const2 THEN action2
  WHEN const3 THEN action3
  WHEN const4 THEN action4
END CASE;

constants may be sorted at compile time, and when executed ,
it will be possible internally to use fast search:

IF x<=const2 THEN
    IF x=const1 THEN action1
                        ELSE action2
    END IF;
ELSE
     IF x=const3 THEN action3
                          ELSE action4
    END IF;
END IF;



------------
pasman

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux