OSDN Git Service

Fix performance bug in constant-expression simplifier. After finding
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 12 Mar 2000 19:32:06 +0000 (19:32 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 12 Mar 2000 19:32:06 +0000 (19:32 +0000)
commit1879175b18211962984e6ff0f3cba344c386b11c
tree9673b9922dc4229839ccf6ab46f127caf535aaad
parentef3386affebb641bf84a528fc2b62530577c10e8
Fix performance bug in constant-expression simplifier.  After finding
that the inputs to a given operator can be recursively simplified to
constants, it was evaluating the operator using the op's *original*
(unsimplified) arg list, so that any subexpressions had to be evaluated
again.  A constant subexpression at depth N got evaluated N times.
Probably not very important in practical situations, but it made us look
real slow in MySQL's 'crashme' test...
src/backend/optimizer/util/clauses.c