You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Hervé Barrault (JIRA)" <ji...@apache.org> on 2011/08/19 17:15:27 UTC

[jira] [Created] (AMQ-3462) Performance of purge method

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

       

[jira] [Issue Comment Edited] (AMQ-3462) Performance of purge method

Posted by "Hervé Barrault (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087761#comment-13087761 ] 

Hervé Barrault edited comment on AMQ-3462 at 8/19/11 3:29 PM:
--------------------------------------------------------------

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 are 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 select requests. 
    specify that a delete request will only delete one message.







      was (Author: hervbarr):
    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

       

[jira] [Commented] (AMQ-3462) Performance of purge method

Posted by "Hervé Barrault (JIRA)" <ji...@apache.org>.
    [ 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