MEDITECH DR, NPR, MEDITECH Reporting, MEDITECH Reports, MEDITECH DR Reports, MEDITECH BI, MEDITECH Data Repository
I'm your host, John Sharpe, a MEDITECH Consultant living in Spokane, WA. Read more ...
Expand your network by connecting on these social media sites:
Sign up for the MEDITECH Reports Blog; details to attend MEDITECH workshops are sent out 1 week in advance to all MEDITECH Report blog subscribers.These MEDITECH Workshops are sponsored by Donna Carroll at the MEDITECH Community Bulletin
Ascii Table: For NPR Report Writer Loop Builder: For NPR Macros Key Codes: For CDS Attributes List Builder: For NPR Macros MT Report Names: For NPR Reports MT Structure Viewer: For Physicals Strings: Format & Sort
Current Articles | RSS Feed
Gary my DBA says, you're trying to do too much in your query. With over 20 joins and 200+ fields in my MEDITECH DR query; I knew he was right. Gary suggested Temp Tables over the Common Table Expression (CTE) I was using.
At 50,000 feet creating and using temp tables goes like this.
My newest script utilizing temp tables, can be found at the MEDITECH Open Source - SQL for Data Repository, and may be just what you need to improve performance on a T-SQL script of your own.
MEDITECH DR SQL Repository >> SQL Server Temp Table Script
SQL Server temp tables can be just the solution for queries with many joins on large MEDITECH DR tables.
UPDATE: after implementing the query using temp tables, the run time improved from 9 hours to a blistering 52 seconds.
References:
Want an alert when the next post is published? Click the phone and Subscribe to the MEDITECH Reports Blog!
Allowed tags: <a> link, <b> bold, <i> italics