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 » hashmap or hashtable ?

Post new topic  Reply to topic
 hashmap or hashtable ? « View previous topic :: View next topic » 
Author Message
Maximreality
PostPosted: Wed Nov 22, 2006 4:55 am    Post subject: hashmap or hashtable ? Reply with quote

Acolyte

Joined: 04 Jun 2004
Posts: 65
Location: Copenhagen

Do we have the concept of a hashmap or hashtable in ESQL?

I can only find advanced datatypes that is based on tree structures (like row)

/Rasmus
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 22, 2006 5:04 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

A tree is all you've got.

You can treat a ROW variable as a Hash, though, using {}.

DECLARE myHash ROW;
Set myLookup = 'abcd';
set myHash.{myLookup} = '123';

set newValue = myHash.{myLookup};

It may not perform as well as you'd like it to, particularly on large trees.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Wed Nov 22, 2006 5:06 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

in my experience ..no .. though you can do selects on the tree structures you have , thus simulating a key-value behaviour.
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
Maximreality
PostPosted: Wed Nov 22, 2006 5:24 am    Post subject: Reply with quote

Acolyte

Joined: 04 Jun 2004
Posts: 65
Location: Copenhagen

jefflowrey wrote:
A tree is all you've got.

You can treat a ROW variable as a Hash, though, using {}.

DECLARE myHash ROW;
Set myLookup = 'abcd';
set myHash.{myLookup} = '123';

set newValue = myHash.{myLookup};

It may not perform as well as you'd like it to, particularly on large trees.


....the problem here is CPU cost (we are running on z/OS)
We have several interfaces using lookup tables in a DB2 and i am trying to cache these lookup tables on the broker with the SHARED functionality of version 6.

I am currently using the ROW for this experiment, but was just wondering if we had something better/faster/cheaper.

The lookup tables varies from 20 -> 500.000 entries, but most of them have around 500-3000 entries.

/Rasmus
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 22, 2006 5:29 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you're looking to reduce CPU cost for Broker on z/OS... you should be looking to use JavaCompute nodes and offload work to the ZAAP.

Otherwise, yes - you're on the right track using Row variables to cache database lookups. The sample in the Samples gallery should perform fairly well - and you can use it to run benchmarks as well.
_________________
I am *not* the model of the modern major general.
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 » hashmap or hashtable ?
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.