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 » General IBM MQ Support » time taken to clear queue

Post new topic  Reply to topic
 time taken to clear queue « View previous topic :: View next topic » 
Author Message
In_love_with_MQ
PostPosted: Wed Aug 30, 2006 5:55 pm    Post subject: time taken to clear queue Reply with quote

Acolyte

Joined: 10 Jul 2005
Posts: 70

I have a queue A with 200000 persistent messages of 32 kb size each

I have q queue B with 200 persistent messages of 32 kb size each


when i say CLEAR Q on both it takes the same time to clear the queue . 5 seconds ..


I was expecting Queue A clearing would take more time .

why is that both takes same time to clear .
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Aug 30, 2006 6:30 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

CLEAR QUEUE just resets pointers to the data in the q file. It doesn't physically remove each individual message - it just resets the storage.

Basically, what it means is... the people who wrote the code behind CLEAR QUEUE knew what they were doing and turned what a naive programmer would make an O(N) operation into an O(1) operation.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
In_love_with_MQ
PostPosted: Wed Aug 30, 2006 10:02 pm    Post subject: thanks jeff Reply with quote

Acolyte

Joined: 10 Jul 2005
Posts: 70

hi jeff ,

Thanks for the knowledge .

Just 1 more doubt . So if clear Queue does not remove physically . Then how this physical files are cleaned .
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Thu Aug 31, 2006 4:51 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

They aren't, they don't need to be. They will get reused.

If you need to 'physically' remove the queue then that is totally different. CLEAR QUEUE only 'removes' messages from a queue, it doesn't dlete the queue.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Aug 31, 2006 6:37 am    Post subject: Re: thanks jeff Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

In_love_with_MQ wrote:
hi jeff ,

Thanks for the knowledge .

Just 1 more doubt . So if clear Queue does not remove physically . Then how this physical files are cleaned .


MQ clears the messages physically sometime, when it has time. You cannot force the physical deletion of the queue contents.
_________________
Regards
Hubert


Last edited by HubertKleinmanns on Thu Aug 31, 2006 6:47 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu Aug 31, 2006 6:39 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Actually, I believe that other people here have seen that CLEAR QUEUE does free up the space in the q file.

I'm sure this is because it resets the pointer for the end of the file to point to the head of the file... Because, you see, the people who wrote the code...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Aug 31, 2006 6:50 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

jefflowrey wrote:
Actually, I believe that other people here have seen that CLEAR QUEUE does free up the space in the q file.

I'm sure this is because it resets the pointer for the end of the file to point to the head of the file... Because, you see, the people who wrote the code...


I saw both - and only MQ (and maybe the developers ) know it exactly.
_________________
Regards
Hubert
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 » General IBM MQ Support » time taken to clear queue
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.