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 » Deleting set of records from list without looping in WMB

Post new topic  Reply to topic
 Deleting set of records from list without looping in WMB « View previous topic :: View next topic » 
Author Message
touchofcrypticthunder
PostPosted: Mon Feb 11, 2013 9:04 am    Post subject: Deleting set of records from list without looping in WMB Reply with quote

Apprentice

Joined: 08 Jul 2009
Posts: 30

I am looking for a solution to delete set of records matching slection criteria from a large list without looping through the list. This is something similar to "DELETE FROM TABLE WHERE(<matching condition>)" SQL statement.

The actual scenario is, we have big list of records from backend service which have parent child relationship based on an element say "ParentId" in the records. I loop through the list and use SELECT statement on this list to fetch the related records and process them. Then I will create separate message by grouping the records having the same ParentId. I will keep track of ParentId's processed so that the records having the same ParentId is not processed again. Another thing to note here is, records having the same ParentId can appear anywhere in the list which need not be sequential.

To have good response time, I thought it would be better to delete the records processed using SELECT statement so that list becomes smaller and smaller and processing time would become more efficient.

I did not find a simpler way to delete the processed records without looping and hence posting this in this forum. Please let me know if there is a way in ESQL to delete set of records without looping and which simulates SQL DELETE statement.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Feb 11, 2013 9:13 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

1. You could feed your data superset into MbCache and perform selects against a composite field from the cache.

2. You could create a temporary table in solidDb.

3. You could create a view in the database.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Feb 11, 2013 9:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You could use a select to assign the output to a list of things that do not contain the matched parentid.
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Mon Feb 11, 2013 11:57 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

And what is wrong with looping? I think that data structure (perhaps one of the ROW -type trees) you are using doesn't support index or other concept that it could be using to select all the matching records from the arbitary ordered set. I think that at the background the DELETE / SELECT -algorithm need to loop all remaining records anyway.

I think that it might be possible to join the selection / assignment to the new data structure and deletion of the used record in the same loop so you need to loop through your data only as many times as you have parents in your data.

--
Marko
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Deleting set of records from list without looping in WMB
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.