activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac" <de...@nighttale.net>
Subject Re: jdbcPersistenceAdapter with derbydb get slow
Date Thu, 27 Sep 2007 08:27:41 GMT
I've peaked into Default JDBC adapter and here are some quick tips I can
recommend.

As far as I can see the only additional index that could be helpful is
combined index on container and id columns (find next message query).

Also, I would recommend if you can recreate your indexes as it usually helps
with performances. It would be a good practice if we add this as a batch job
to be executed periodically as it can improve performances a great deal.

I have some experience with  optimizing access to large tables in Derby, so
I'll try to find some time to dig into this a bit deeper.

Thanks,
Dejan

On 9/26/07, Márcio Moraes <mmoraes.br@gmail.com> wrote:
>
> I looked at derby database and saw ~244,000 messages on ACTIVEMQ_MSGS
> table,
> all messages have been consumed.
>
> Why does messages was not deleted after consume?
>
> ActiveMQ logs says:
>
> ActiveMQ Cleanup Timer]2007-09-26 09:15:56,630 DefaultJDBCAdapter:537  -
> Executing SQL: DELETE FROM ACTIVEMQ_MSGS WHERE ( EXPIRATION<>0 AND
> EXPIRATION<?) OR ID <= ( SELECT min(ACTIVEMQ_ACKS.LAST_ACKED_ID) FROM
> ACTIVEMQ_ACKS WHERE ACTIVEMQ_ACKS.CONTAINER=ACTIVEMQ_MSGS.CONTAINER)
>
> Is there some configuration i need do?
>
> I am using Jencks 2.0 and creating the TopicSession with AUTO_ACKNOWLEDGE
> mode.
>
> Att,
>
> Márcio Moraes
>
> Thanks.
>
> 2007/9/26, Márcio Moraes <mmoraes.br@gmail.com>:
> >
> > After receiving and consuming ~200,000 messages with
> > jdbcPersistenceAdapter and derbydb ActiveMQ get slow, very slow.
> >
> > Is jdbcPersistenceAdapter-derbydb ready to use in production
> environment?
> >
> > What kind of persistence you guys have using?
> >
> > Att,
> >
> > Márcio Moraes
> >
> >
> >
>



-- 
Dejan Bosanac
www.scriptinginjava.net

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message