Anil's Blog is Best Viewed on GOOGLE CHROME

Wednesday, August 21, 2019

SOA - DB Adapter performance issue having 1-N Relations Table


I faced the problem that it took a long time to execute select in DB Adapter. There were three tables that contained a large amount of data and contained many columns, and these tables were being handled by the DB Adapter.

The database side configured a primary key / foreign key relationship between the tables and recreated the DB Adapter, but the same problem occurred. The problem occurs when the user edits the SQL on the Define Selection Criteria page of the DB Adapter. Here are some ways to work around this problem:

Open -or-mappings.xml file
Find true </ batch-reading> and change true to false

Open the DB Adapter wizard again, go to the Define Selection Conditions page, and define the where clause.  Check the Return a single result set for both master and detail tables using outer join checkbox. This recreates the SQL.

Change the where clause of this new SQL statement. Be careful not to change before the From clause.

Click Finish to deploy the project.

Test the application.

For TopLink batch attribute reading (default is true),  if this is true and you edit "Selection Condition Definition" in the DB Adapter Wizard, you may scan the entire table with a one-to-many relationship .
To avoid this, batch loading was set to false.

Cheers!!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.