Tuesday, October 5, 2010

DB Clean | performance of overall site

DB Clean:
In my opinion next to Dynacache\EdgeCaching strategies for a site. I would consider DB Clean a very important aspect of improving site performance for WCS. It would also prevent any junk car issues.

Out of the box, commerce provides a table for adding these queries CLEANCONF table, which is good enough for most basic queries for complex cleanup operations, it is very important to use store procedures.

High Level commerce deletes required for
1. Address
2. CtxMgmt
3. Guest users
4. Orders
5. Schedulers
6. Staglog
7. CustomData

e.g.
insert into cleanconf (OBJECTNAME, TYPE, STATEMENT, NAMEARG, SEQUENCE, DAYSARG)
values (
'activity', 'remove-obsolete-ctxmgmt',
'delete from ctxmgmt where lastaccesstime < (sysdate - ?)',
'no', 1, 'yes');

Crontab utility in unix/solaris can be used to schedule these jobs. Usually it is very important to wrap this in a shell script and use some logging and also capture the PID, if you need to kill a process.

4 comments:

  1. Hi Raj,
    I am looking for a way to schedule the db clean utility using the WebSphere scheduler. Can you tell me is there any way to do that or do I have to stick with the shell script and crontab method.

    ReplyDelete
  2. This is a valuable discussion of database cleanup as part of improving overall IBM WebSphere Commerce site performance. Regularly removing obsolete records from areas such as addresses, guest users, orders, scheduler data, and staging logs can help control database growth and reduce unnecessary overhead. The recommendation to use stored procedures for complex cleanup operations and shell scripts with logging for scheduled jobs is also useful for maintaining reliable database operations.

    Effective database connectivity and transaction management are important when developing applications that interact with relational databases. SQLAlchemy Training can help developers understand database interactions, SQL execution, and transaction handling in Python applications.

    ReplyDelete
  3. Database maintenance is an important part of building dependable data infrastructure, particularly when applications generate large volumes of transactional data. Data Engineering Training can help learners develop a broader understanding of database systems, data pipelines, and the practices used to maintain efficient data processing environments.

    ReplyDelete