Patent Document ID: 8332373
Application ID: 10324267

Base Claim:
1. A method for use in a database system having at least one processor, comprising: creating a user-defined routine in the database system; selectively setting an indicator to have one of plural values; representing a predicate expression invoking the user-defined routine with one of plural types of data structures based on the value of the indicator; and selecting, by an optimizer executed on at least one processor in the database system, whether or not to use indexing and statistics in a query plan for a query containing the predicate expression based on determining which of the plural types of data structures is used to represent the predicate expression invoking the user-defined routine.

---

Claim 9:
9. The method of claim 1 , further comprising representing the predicate expression with an operator-based parse tree structure if the indicator has a first value, and representing the predicate expression with a function-based parse tree structure if the indicator has a second value, the operator-based parse tree structure and function-based parse tree structure being two of the plural types of data structures.