Re: Adding indexes for performace
Tim Anderson <[email protected]> Sun, 25 Feb 2007 16:30:35 +1100
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
Hemant Gaur wrote:
> Hi,
> Recently I have added the expiration time to the OpenJMS release
> version (0.7.6.1).
> This works fine for the less messages, but when the messages grow to
> the range of 100,000 they are not deleted even if they have expired.
> Restart of the OpenJMS also does not deletes them. I have verified
> from the expiry time field that they have indeed expired. Adding the
> indexes suggested in
> http://sourceforge.net/tracker/index.php?func=detail&aid=872947&group_id=54559&atid=474136
> also does not show any impact on the pub/sub rate. I am using activeMQ
> JMeter and topic based persistant durable messages.
On restart, 0.7.6.x does a
delete from messages where expiryTime > 0 and expiryTime < now
delete from message_handles where expiryTime > 0 and expiryTime < now
where now=System.currentTimeMillis()
Are you sure you're setting the expiration time correctly?
> Also is there any specific reson for ordering of the colums in
> CREATE INDEX message_handles_pk ON message_handles(destinationId,
> consumerId, messageId);
> It seems
> CREATE INDEX message_handles_pk ON
> message_handles(messageId,destinationId, consumerId);
> should be better.
Agreed. Not sure why the scripts have the index in that order. The
master schema.xml has it as:
<index name="message_handles_pk" unique="true">
<column name="messageId" />
<column name="destinationId" />
<column name="consumerId" />
</index>
so creating the schema via dbtool should generate the correct index.
-Tim
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV