Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
6 replies
Subscribers
6 subscribers
Views
2146 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hi there, As part of a project I'm working on, we're using an
chrism854
over 11 years ago
Hi there,
As part of a project I'm working on, we're using an external service to create a document and store it as base64 in an external database. This table has three identifiers, ID, ImageId and AssessmentID. ImageID is unique and primary. One Assessment may have multiple ImageIds and one imageId may have multiple IDs.
Now, what I want is the highest ID for each imageID for a certain assessment. Here's the query I'm using to do this:
SELECT DocumentBase64, ImageId FROM (SELECT DocumentBase64, ImageId, id, assessmentid from b where assessmentid = ac!assessmentid order by id desc) as t
group by `imageid`
Basically what this does is run a subquery which returns a sorted list by ID where assessmentid = whatever I passed. Then, the primary query groups by imageid.
Now this works perfectly, and if I run it directly in MySQL workbench it executes it 0.015 seconds. However, when it runs in Appian and I monitor the process that node took upwar...
OriginalPostID-81719
OriginalPostID-81719
Discussion posts and replies are publicly visible
Parents
0
chrism854
over 11 years ago
...ds of 7 seconds!
Now, the question is, does this query actually take 7+ seconds (and if so, how do we optimise it) or is Appian misrepresenting the length of this node's execution time?
Thank you in advance for any help!
Chris
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
chrism854
over 11 years ago
...ds of 7 seconds!
Now, the question is, does this query actually take 7+ seconds (and if so, how do we optimise it) or is Appian misrepresenting the length of this node's execution time?
Thank you in advance for any help!
Chris
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data