Link Sub-Clauses

A link sub-clause is a sub-clause that:

When the Query Processor has identified the link clauses in a query, it stores them temporarily in an internal list. Later in the optimization algorithm, the Query Processor will assign each of the link sub-clauses to a filter condition for an appropriate table. The table that is chosen is:

The link sub-clauses are assigned for every permutation of the table order (see Calculate the Table Order Permutations).

Example:

When the Query Processor has categorized the sub-clauses in a query, it begins to calculate the permutations for the table order. For each permutation, the Query Processor assigns the link sub-clauses to the right-most table in the table order. So, if a query is used to search three tables (Table A, Table B, and Table C) and the query contains a link sub-clause that references Table B and Table C, the link sub-clause will be assigned to each permutation as follows:

  • A,B,C

    The link sub-clause is allocated to Table C as, in this order, Table C is the right-most table that is referenced by the sub-clause.

  • A,C,B

    The link sub-clause is allocated to Table B as, in this order, Table B is the right-most table that is referenced by the sub-clause.

  • B,A,C

    The link sub-clause is allocated to Table C as, in this order, Table C is the right-most table that is referenced by the sub-clause.

  • B,C,A

    The link sub-clause is allocated to Table C as, in this order, Table C is the right-most table that is referenced by the sub-clause.

  • C,A,B

    The link sub-clause is allocated to Table B as, in this order, Table B is the right-most table that is referenced by the sub-clause.

  • C,B,A

    The link sub-clause is allocated to Table B as, in this order, Table B is the right-most table that is referenced by the sub-clause.


Disclaimer

Geo SCADA Expert 2022