Provide UDR-optimization functions

The DataBlade® API provides support for you to create the following kinds of special-purpose UDRs to optimize UDR performance:
  • Tasks that optimize execution of UDRs
    When you write a UDR, you can provide the query optimizer with the following information to help it determine the best query path for queries that contain the UDR.
    Filter optimization More information
    Parallel Execution Creating parallelizable UDRs
    Cost-of-execution Query cost
  • UDRs that optimize query filters
If your UDR returns a BOOLEAN value (mi_boolean), it is called a Boolean function. The following table shows the kinds of Boolean functions that are useful as filters in a query.
Table 1. 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 Boolean functions useful as query filters, 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 implementing a negator function with a C user-defined function
Selectivity Query selectivity