Bug 779048 (SOA-1457)

Summary: Update jbossesb-service.xml ExistsSql to use a more efficient SQL statement
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: david.boeren <david.boeren>
Component: ConfigurationAssignee: Default User <jbpapp-maint>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3 CP01   
Target Milestone: ---   
Target Release: 4.3 CP02   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-1457
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-09 19:39:37 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description david.boeren 2009-08-20 14:16:59 UTC
Affects: Release Notes
Date of First Response: 2009-11-09 07:26:31
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/?module=issues&action=view&tid=332311&gid=1354
project_key: SOA

The ExistsSql statement is run on startup to check for the existence of the message table.  Currently it uses:  select * from message

This can take both a considerable amount of time and memory if the message table is large and there is no need for it.

I suggest replacing this with select count (*) from message to speed up the server start and avoid potential out of memory errors if the table is large enough.

Comment 1 Julian Coleman 2009-11-09 12:26:31 UTC
This was fixed for 4.3.0 CP02 with:
  http://fisheye.jboss.org/changelog/JBossESB?cs=26923
which changed the ExistsSql statements in:
  jbossesb.esb/jbossesb-service.xml
  jbpm.esb/jbpm-service.xml
to use:
  select count(*)
instead of:
  select *

Comment 2 Julian Coleman 2009-11-09 12:28:04 UTC
Affects: Added: [Release Notes]


Comment 3 Julian Coleman 2009-11-09 12:34:35 UTC
Also changed was:
  jbossesb.sar/esb.juddi.xml


Comment 4 Len DiMaggio 2009-11-09 19:39:37 UTC
Verified in the 4.3 CP02 GA bits.