Hello,
I am not sure if everybody understands the concept of the different queries which are supported in PDI and when to use which.
Let me shed some light on this.
Three Kinds of Queries
PDI is supporting three different kinds of queries.
- QueryByElement
- I am quite sure everybody knows these queries which are generated for every node by the framework automagically.
- These queries support only the elements of the own node, for the selection parameter as well as for the result.
- As they access direct the database table there is no optimization for this query access.
This means a shot execution can only happen if the key fields are part of the selection conditions. These are- Node ID (which you will probably never use in a search)
- Alternative Key annotated elements.
- Furthermore this is only true if the operator for the selection is the equal comparison.
- This makes theses queries not the preferred ones if your selection criteria do not match these conditions.
Especially if there are many entries in the database table.
- QueryBuilder
- You define a (technical name) Query Response Transformation Node (QRTN) which can make use of any element which can be reached from the node to this query is attached.
- The implementation is based on the Fast Search Infrastructure (FSI) so you can expect
- A fast execution
- Support of any comparison operator
- This query will give you a quick access to the search data in many places.
- You define a (technical name) Query Response Transformation Node (QRTN) which can make use of any element which can be reached from the node to this query is attached.
- SADL based Queries
- These queries are defined direct in the UI (typically OWLs) and grasp direct to the data avoiding any framework overload.
- This access is not only dedicated for key access but also for query, so you can also expect
- A fast execution
- Support of any comparison operator
- As there is no further propagation of the query definition it can only be used in the the UI in which it is defined.
No reuse.
I hope your decision about "Which query shall I use for my case?" can now be answered more easily.
That's all, folks,
Horst