Support Article
SQLs involved during the RTDS makeDecision call
SA-8324
Summary
User wants the list of SQLs executed within DecisionServiceBean --> getRealTimeProjectConfiguration. During their performance testing they see that this particular method is consuming more time for some of the requests. Hence want details of what this method does and if any performance tuning can be done from their side to optimize the response times.
Resolution
The CDM application triggers a hibernate call to fetch the data from database.
The getRealTimeProjectConfiguration method will fetch the data from RTDS_RT_PROJECT table in the Real Time Decisioning service (RTDS) schema based on the Project name. If there are multiple deployed versions of the real-time project, the
getRealTimeProjectConfiguration() call always returns the configuration for the latest deployed project. Important to note that the first call after a server start / re-start will take more time to fetch the RealTimeProject (RTP) configurations from database and will be loaded into memory; however successive calls will be faster as it will be served from the memory.
During a makeDecision() call a hibernate call will be involved to fetch the records part of the DCS adapters used in Real-time project.
In order to view the specific SQL’s triggered during the hibernate call, one may enable the hibernate logging for RTDS by following the below steps:
Customizing SQL statement logging is done by changing the persistence.xml resource in the META-INF directory of the “/rtds.ear/rtds-core.jar”
Follow these steps to enable SQL statement logging:
- Go to the property that controls SQL statement. By default, it is set to false.
<property name="hibernate.show_sql" value="false" />
- Change the level to true.
<property name="hibernate.show_sql" value="true" />
Re-deploy the EAR to see the hibernate logging being logged in the system.out file.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.