About query types
A number of reports (views) in the screen display SQL query statements. Guidewire uses the following information to indicate the source of the SQL query.
| Query | Operation type | Meaning |
|---|---|---|
qRoot |
Row | Generic query of a database table row. |
/* KeyTable:TableName */ |
Key load | Embedded comment in the initial query to retrieve the IDs of beans (objects) prior to loading them. See Key loads for more information. |
bRoot |
Bean | Query to load the actual beans (objects) themselves. |
rbRoot |
Rule | Query generated by a rule. |
gRoot |
Gosu Query API | Query generated by the Query API. |
vbRoot |
View Bean | Query to retrieve the ViewEntity object that displays the
result of a database query. |
aRoot |
Array load | Query for loading the keys of all the entities in an array. |
amRoot |
Array (multiparent) load | Query to load a multiparent array. |
lcRoot |
Link chain | Query to load an entity link chain. See Link chains for more information. |
Example SQL statement
SELECT
/* KeyTable:pc_profilerconfig; */
gRoot.ID col0,
gRoot.Subtype col1,
gRoot.EntryPoint col2,
gRoottl0.S_en_US col1s
FROM
pc_profilerconfig gRoot
INNER JOIN
pctl_profilerconfig gRoottl0
ON
gRoottl0.ID = gRoot.Subtype
WHERE
gRoot.ProfilerEnabled = ?
ORDER BY
col1s ASC ,
col2 ASC ,
col0 ASC
FETCH NEXT ? ROWS ONLYKey load
As PolicyCenter loads a bean (object), it executes a query to retrieve the bean ID, and sometimes the bean subtype. Using this information, PolicyCenter queries the bean cache to determine if the bean already exists in the cache. If the bean is not in the cache, PolicyCenter loads the bean into the cache. Guidewire inserts this type of comment in the initial query to retrieve the bean IDs.
Link chains
Whenever a direct change happens to an event-aware object, the action automatically
generates an XXXChanged event for that object instance.
However, many event-aware objects have sub-objects as well. And, often, it is the case that
a user changes the sub-object, but, not the parent object itself. In this case, PolicyCenter generates a change event for the top-level object, even
if the top-level object has not changed directly. Depending on the complexity of the data
model, this type of action can lead to an excessive number of link-chain queries, which, in
turn, can degrade the performance of bundle commit operations. (PolicyCenter issues these types of queries during a commit
operation.)
It is possible to exclude certain links (foreign keys or arrays) from participating in these queries, if you decide that a particular relationship is not important for the purpose of determining events. It is also possible to exclude entire entities, if you determine that any change to instances of that entity need not cause the generation of a changed event for any top-level entity that references that entity.
To exclude these types of links from the SQL queries, set the
ignoreforevents attribute on the entity you want the changed event
operation to ignore. See the discussion of this attribute in <entity> elements and related data object types for more
information.
