Home | Previous Page | Next Page   Creating User-Defined Routines > Creating Special-Purpose UDRs >

Providing UDR-Optimization Functions

The DataBlade API provides support for you to create the following kinds of special-purpose UDRs to optimize UDR performance:

If your UDR returns a BOOLEAN value (mi_boolean), it is called a Boolean function. Table 106 shows the kinds of Boolean functions that are useful as filters in a query.

Table 106. Boolean Functions Useful as Query Filters
Comparison Condition Operator Symbol Associated User-Defined Function
Relational operator =, !=, <>

<, <=

>, >=

equal( ), notequal( ), notequal( )

lessthan( ), lessthanorequal( )

greaterthan( ), greaterthanorequal( )

LIKE, MATCHES None like( ), matches( )
Boolean function None Name of a user-defined function that returns a BOOLEAN value

When you write one of the Boolean functions in Table 106, you can also provide the query optimizer with information about how to best evaluate a filter that consists of the Boolean function. You can define the following UDR-optimization functions for Boolean functions.

Filter Optimization
More Information
Negator function
Creating Negator Functions
Selectivity
Query Selectivity
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]