web stats
SQL Query to database - performance - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2017, 09:26 AM
jcurry5 jcurry5 is offline
OBX.2 Kenobi
 
Join Date: May 2013
Posts: 59
jcurry5 is on a distinguished road
Default SQL Query to database - performance

I have 15 channels that run perform SQL queries against a database table (only one table) to see if a record is ready to be sent out via HL7. After it is sent out, a pre-processor runs to update the record in the table to mark is 'complete'.

I've received emails saying that the application that connects to the database is having performance issues and related to the very simple select and update query that each of the channels executes.

Is there a best practice when working with 15+ channels to run a SQL query in the Source and Scripts/Pre-processor tab to determine when a record needs to be sent out?

The Source tab runs a stored procedure that passes in one parameter.
Reply With Quote
  #2  
Old 02-13-2017, 01:43 AM
obsessio obsessio is offline
Mirth Guru
 
Join Date: Mar 2015
Location: Turkey
Posts: 177
obsessio is on a distinguished road
Default

Actually we can not say certain things because of 15 custom channels but you can try db connection pool or connecting your db at deploy. So you don't need to create connections every time.
Reply With Quote
  #3  
Old 02-13-2017, 01:51 AM
AlexNeiva AlexNeiva is online now
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 280
AlexNeiva is on a distinguished road
Default

Dear jcurry5,

if it it only select and updte, why don't you create a Procedure or Function in DB and on Mirth side you just call it?
I guess it is better other wise you will open/close connection for each channel and that is not good practice.
It is my opinion...
Reply With Quote
  #4  
Old 02-13-2017, 03:04 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 838
siddharth is on a distinguished road
Default

I am guessing the email came from your DBA team, which realized the severity of the problem, before it would grow exponentially.

Why is it a problem? Read this thread and associated possible solution.

http://www.mirthproject.org/communit...ase+Connection

Last edited by siddharth; 02-13-2017 at 03:05 AM. Reason: corrections
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:47 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation