Databases Reference
In-Depth Information
Finally, the actual output table, the one we now have in the data model, looks
like this:
Some considerations
When working with the
IntervalMatch
function, it is important to keep the
following in mind:
• This function is resource heavy, so, depending on the size of the input
intervals table and the elements list, you should first consider if the machine
you are working with will be able to handle the operation. Otherwise, you
may need to break the work in parts.
• The intervals might enclose elements that are not actually needed in the
data model, and we must ensure those elements are not considered when
expanding the intervals, so that we save CPU and RAM resources. To do
this, the elements list we input in the
IntervalMatch
function should only
contain the required elements.
• Similarly, the intervals table should contain unique records, with no
duplicates, to save resources. If one interval is present twice, then the
IntervalMatch
function will split it twice. Using the
Distinct
keyword
will help us in this matter.
• When using the intervals table, the fields must be specified in the correct
order: the start value before the end value.
Applying IntervalMatch to the Carrier Decode table
Now that we've seen an example of how the
IntervalMatch
function works,
we are ready to apply the learned concepts to the
Carrier Decode
table we
discussed earlier.