[
https://issues.apache.org/jira/browse/AMQ-3462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087761#comment-13087761
]
Hervé Barrault commented on AMQ-3462:
-------------------------------------
I have not put a patch available because it could be possible to improve these
performances by modifying more things in the message store code.
Today, it uses a select and then a delete to delete a message (seems no
specific logic added between the two calls).
It could be simplified (and also reduce calls to database) with only the delete.
There is other things which can improve the performance, such as adding some
specific request using a mechanism like adapter for the statements to be able
to limit the number of results in request or for delete method to specify that
it will only delete one message.
> Performance of purge method
> ---------------------------
>
> Key: AMQ-3462
> URL: https://issues.apache.org/jira/browse/AMQ-3462
> Project: ActiveMQ
> Issue Type: Improvement
> Components: Message Store
> Affects Versions: 5.4.0
> Environment: Oracle 11gR2 / PostgreSQL 8.4
> Reporter: Hervé Barrault
>
> When calling the purge method, it takes a long time if you have a lot of
> messages.
> The "request" to delete a message takes 3 parameters but there is no
> dedicated index linked to this "request".
> Adding a new index seems improving the performances (in my case under oracle
> duration is divided by 5 for 32k messages and it is not linear).
> CREATE UNIQUE INDEX ACTIVEMQ_MSGS_FULLIDX ON ACTIVEMQ_MSGS ("MSGID_PROD",
> "MSGID_SEQ", "CONTAINER");
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira