ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Performance problem or my stupidity?

Post new topic  Reply to topic
 Performance problem or my stupidity? « View previous topic :: View next topic » 
Author Message
mark.luebinski
PostPosted: Tue Jan 02, 2007 9:01 am    Post subject: Performance problem or my stupidity? Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

Dear masters,

I have this code:

SET Environment.Variables.GRTG2SR_VAR = ROW(SELECT T.TAB_TEXT, T.TAB_KEY FROM ...

which returns 6322 rows in nearly 2 seconds (in Debugger).
Then I make a reference

DECLARE pointer REFERENCE TO Environment.Variables.GRTG2SR_VAR.Column0;

MOVE pointer FIRSTCHILD NAME 'TAB_TEXT';
WHILE LASTMOVE(pointer) DO
SET pointer = SUBSTRING(pointer FROM 16 FOR 46);
MOVE pointer PARENT;
MOVE pointer NEXTSIBLING;
MOVE pointer FIRSTCHILD NAME 'TAB_TEXT';
END WHILE;


This code works 2 hours yet with 95% of CPU. I cannot see any deadlock and 6322 Rows are not too much.
What I'm making wrong?

Thank you!

Mark
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 02, 2007 9:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Um.

I don't understand this line
Code:
SET pointer = SUBSTRING(pointer FROM 16 FOR 46);
at all.

Also, I would only move the reference between the Column0s, and not down into the children and then back out.

So something closer to
Code:
 DECLARE pointer REFERENCE TO Environment.Variables.GRTG2SR_VAR.Column0;
 WHILE LASTMOVE(pointer) DO
SET SomeVar = SUBSTRING(pointer."TAB_TEXT" FROM 16 FOR 46);
MOVE pointer NEXTSIBLING;
END WHILE;

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mark.luebinski
PostPosted: Tue Jan 02, 2007 10:05 am    Post subject: Reply with quote

Acolyte

Joined: 27 Mar 2006
Posts: 56

Thank you! this way is better and easier to read.
I guess, my mistake was the pre-least Move - it pointed allways to last element and I don't check lastmove... Lastmove was allways to his children - and allways correct
Your way my code worked only 3 sek.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Performance problem or my stupidity?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.