Daniel John Debrunner wrote:

>Wow, I'm glad I pestered. This was a useful exchange, found a bug in the
>patch, I learnt something about predicates & search clauses, and
>potentially it lead you to find another performance bug related to
>parameters. Thanks for being patient with me.
>  
>
Thank you.. for finding one issue.

>Just quickly thinking about the checking for ConstantNode you mention, I
>wonder if that is the correct approach. I thought a ValueExpression node
>had a method that indicated its invariance, thus checking if a value is
>statement (or query?) invariant should be used instead of it being an
>instanceof ConstantNode or ParameterNode. That would mean in the future
>functions that were declared deterministic on invariant values could
>also be seen as constants for such optimizations. That's probably a
>future cleanup, but it would be a much better approach than having these
>instanceof checks.
>  
>
I have to look at this some more... It is the right approach, but I
don't see this being done in other similar places. Same ignorance? I
have to make sure.

>Not sure the patch at this point in time has to address pushing down
>'3 = a' if the column reference does appear on the right in the node
>tree, but I'm curious about it.
>  
>
I would expect this to be normalized very early, but I will confirm.

Satheesh

>Thanks,
>Dan.
>
>
>
>
>  
>

Reply via email to