|
Re: Extremely high number of SQL statements executed for activity instance query [message #749220 is a reply to message #749208] |
Tue, 25 October 2011 05:06 |
Vikram Kodak Messages: 72 Registered: October 2011 |
Member |
|
|
I would assume that the data you're passing in is a descriptor (IN Data Path on process definition marked as descriptor pointing to Dispute ID data). Is this correct?
Descriptor values are fetched with the query, but only if below construct has been defined for the query as well.
EvaluationPolicy policy = DescriptorPolicy.WITH_DESCRIPTORS;
query.setPolicy(policy);
Per default descriptors are not fetched (as long as this default behavior has not been changed we will verify). Are you using this construct somewhere?
... We cannot really believe that this is an dispute ID. Is it? What process data type are you using for dispute IDs?
[Updated on: Tue, 25 October 2011 05:06] Report message to a moderator
|
|
|
|
Re: Extremely high number of SQL statements executed for activity instance query [message #749232 is a reply to message #749227] |
Tue, 25 October 2011 05:15 |
Vikram Kodak Messages: 72 Registered: October 2011 |
Member |
|
|
So it looks like we have a different issue here. You have not defined descriptors at all. The problem is that the data you're using for your query is a Serializable, which will be serialized first and stored as multiple String snippets in STRING_DATA table. To do a comparison, the engine needs to load the data from STRING_DATA table. That's why you're observing hundreds of SELECT statements of type below, even though the actual result set would much smaller.
SELECT oid, objectid, data_type, data
FROM gpcarnot.STRING_DATA WHERE (gpcarnot.STRING_DATA.objectid = 25672 AND gpcarnot.STRING_DATA.data_type = 'data_value')
ORDER BY gpcarnot.STRING_DATA.oid ASC
SELECT dv.oid, dv.model, dv.data, dv.string_value, dv.number_value, dv.type_key, dv.processInstance
FROM gpcarnot.data_value dv
WHERE (dv.processInstance = 3637 AND dv.data = 281474976710667)
In those scenarios you should write the identifier (dispute ID) into a primitive process data once the Dispute is created. Primitives (strings or numbers) can be compared with what you're passing into query in one shot as part of the query itself.
|
|
|
Powered by
FUDForum. Page generated in 0.02737 seconds