How To Improve a Business-critical Third-party Application by Optimizing Its Generic Database Settings

by May 24, 2018

Categories

Tags

Administration agent-based monitoring Agentless Monitoring alert responses alert thresholds alerting Alerts Amazon Aurora Amazon EC2 Amazon RDS Amazon RDS / Aurora Amazon RDS for SQL Server Amazon Redshift Amazon S3 Amazon Web Services (AWS) Analytics application monitoring Aqua Data Studio automation availability Azure Azure SQL Database azure sql managed instance Azure VM backup Backup and recovery backup and restore backup compression backup status Backup Strategy backups big data Blocking bug fixes business architecture business data objects business intelligence business process modeling business process models capacity planning change management cloud cloud database cloud database monitoring cloud infrastructure cloud migration cloud providers Cloud Readiness Cloud Services cloud storage cloud virtual machine cloud VM clusters code completion collaboration compliance compliance audit compliance audits compliance manager compliance reporting conference configuration connect to database cpu Cross Platform custom counters Custom Views customer survey customer testimonials Dark Theme dashboards data analysis Data Analytics data architect data architecture data breaches Data Collector data governance data lakes data lineage data management data model data modeler data modeling data models data privacy data protection data security data security measures data sources data visualization data warehouse database database administration database administrator database automation database backup database backups database capacity database changes database community database connection database design database developer database developers database development database diversity Database Engine Tuning Advisor database fragmentation database GUI database IDE database indexes database inventory management database locks database management database migration database monitoring database navigation database optimization database performance Database Permissions database platforms database profiling database queries database recovery database replication database restore database schema database security database support database synchronization database tools database transactions database tuning database-as-a-service databases DB Change Manager DB Optimizer DB PowerStudio DB2 DBA DBaaS DBArtisan dBase DBMS DDL Debugging defragmentation Demo diagnostic manager diagnostics dimensional modeling disaster recovery Download drills embedded database Encryption End-user Experience entity-relationship model ER/Studio ER/Studio Data Architect ER/Studio Enterprise Team Edition events execution plans free tools galera cluster GDPR Getting Started Git GitHub Google Cloud Hadoop Healthcare high availability HIPAA Hive hybrid clouds Hyper-V IDERA IDERA ACE Index Analyzer index optimization infrastructure as a service (IaaS) infrastructure monitoring installation Integrated Development Environment interbase Inventory Manager IT infrastructure Java JD Edwards JSON licensing load test load testing logical data model macOS macros managed cloud database managed cloud databases MariaDB memory memorystorage memoryusage metadata metric baselines metric thresholds Microsoft Azure Microsoft Azure SQL Database Microsoft PowerShell Microsoft SQL Server Microsoft Windows MongoDB monitoring Monitoring Tools Monyog multiple platforms MySQL news newsletter NoSQL Notifications odbc optimization Oracle PeopleSoft performance Performance Dashboards performance metrics performance monitoring performance schema performance tuning personally identifiable information physical data model Platform platform as a service (PaaS) PostgreSQL Precise Precise for Databases Precise for Oracle Precise for SQL Server Precise Management Database (PMDB) product updates Project Migration public clouds Query Analyzer query builder query monitor query optimization query performance Query Store query tool query tuning query-level waits Rapid SQL rdbms real time monitoring Real User Monitoring recovery regulations relational databases Releases Reporting Reports repository Restore reverse engineering Roadmap sample SAP Scalability Security Policy Security Practices server monitoring Server performance server-level waits Service Level Agreement SkySQL slow query SNMP snowflake source control SQL SQL Admin Toolset SQL CM SQL code SQL coding SQL Compliance Manager SQL Defrag Manager sql development SQL Diagnostic Manager SQL Diagnostic Manager for MySQL SQL Diagnostic Manager for SQL Server SQL Diagnostic Manager Pro SQL DM SQL Doctor SQL Enterprise Job Manager SQl IM SQL Inventory Manager SQL Management Suite SQL Monitoring SQL Performance SQL Quality SQL query SQL Query Tuner SQL Safe Backup SQL script SQL Secure SQL Security Suite SQL Server sql server alert SQL Server Migration SQL Server Performance SQL Server Recommendations SQL Server Security SQL statement history SQL tuning SQL Virtual Database sqlmemory sqlserver SQLyog Storage Storage Performance structured data Subversion Support tempdb tempdb data temporal data Tips and Tricks troubleshooting universal data models universal mapping unstructured data Uptime Infrastructure Monitor user experience user permissions Virtual Machine (VM) web services webinar What-if analysis WindowsPowerShell

Problem Background

A business-critical third-party application for Microsoft SQL Server configured the database with generic settings, including general indexes. Such generic parameters are likely going to lead to suboptimal performance and may even lead to poor performance. Use Precise to investigate the impact of such generic index on the performance of the application.

Investigation

Most database performance monitoring products show SQL activity. Precise also indicates busy tables. Precise ranks the most active tables in SQL Server and how SQL Server uses these tables.

The ‘Overview’ pane’ at the top of the ‘Explore Objects’ tab of the “Objects” workspace for the problematic instance of SQL Server (Figure 1) shows that the SQL Server database spent some 1 hour of mostly using CPU and internal wait.

The ‘Active Objects (Tables including their indexes statistics)’ area at the bottom of the ‘Explore Objects’ tab displays the objects in the order of time spent in the SQL Server database. The data grid shows that the top table ‘ORDER_LINE’ is the busiest on the system by far. Its time on using CPU in the SQL Server database and its time for contentions are substantial. The second table ‘CUSTOMER’ suffers from significant time spent on lock wait in the SQL Server database. Since the top table ‘ORDER_LINE’ is vital to important business transactions, it warrants additional attention. There is a lot that a database administrator can do to improve the efficiency of processing. To determine how to improve access to the top table, select it to drill down into its details.

Figure 1: The ‘Explore Objects’ tab of the ‘Objects’ workspace for the problematic instance of SQL Server.

Figure 1: The ‘Explore Objects’ tab of the ‘Objects’ workspace for the problematic instance of SQL Server.

Precise correlates the top table to the SQL statements that access it. The SQL statements that ran on Monday will probably be similar to the SQL statements that will run on Tuesday. Etc. That is, in a business setting, data is often accessed in similar ways day to day. Consider reporting when the managers need to know what happened yesterday, last week, last month, last quarter, last year. The SQL statements will be similar while grouping growing durations of business activity. The similarity implies that a set of indexes exists that is well suited to the accessing the top table. For such a situation, Precise can provide helpful recommendations.

The ‘Overview’ area at the top of the ‘Explore Objects’ tab of the ‘Objects’ workspace for the top table (Figure 2) shows that the table spent some 30 minutes of using CPU.

The ‘Statements’ area at the bottom of the ‘Performance’ tab lists the SQL statements for the top table in the order of time spent in the SQL Server database. The top SQL statement identified by ‘20144‘ spent more than 10 hours in the SQL Server database. The data grid also shows that many of the top SQL statements are similar which is quite common for third-party business applications. These alike SQL statements imply that it may be possible to add indexes to the table that accelerate performance.

Select the ‘Recommend’ tab in the top right of the ‘Objects’ workspace to view recommendations for adding, modifying, and dropping indexes.

Figure 2: The ‘Explore Objects’ tab of the ‘Objects’ workspace for the top table.

Figure 2: The ‘Explore Objects’ tab of the ‘Objects’ workspace for the top table.

The data grid at the top left of the ‘Recommend’ tab of the ‘SQL’ workspace for the top SQL statement (Figure 3) displays the recommendations. The first row of the data grid refers to the recommendation ‘Create Index” for the top table ‘ORDER_LINE’ for an index that is clustered and not unique. The What-If modeling capability is available for this recommendation.

The ‘DDL’ subtab at the right side of the ‘Recommend’ tab displays the data definition language script for the recommended new index.

Below the data grid at the top left of the ‘Recommend’ tab, the ‘Evaluate Recommendations’ area offers to evaluate the impact of the selected recommendations list above to understand how the recommendations affect the statements accessing the relevant objects; the measured improvement simulates what happens when implementing the selected recommendations. Select the ‘Evaluate’ hyperlink to access the modeling functionality by displaying the ‘What-If’ subtab at the right side of the ‘Objects’ workspace.

Figure 3: The ‘Recommend’ tab of the ‘SQL’ workspace for the top SQL statement.

Figure 3: The ‘Recommend’ tab of the ‘SQL’ workspace for the top SQL statement.

The ‘Summary’ area at the top of the ‘What-If’ subtab at the right side of the ‘Recommend’ tab of the ‘Objects’ workspace for the top SQL statement (Figure 4) displays a pie chart. The pie chart shows the cost of the recommended new indexes as displayed in the data grid with the recommendations on the left side of the ‘Objects’ workspace. The pie chart shows that the cost mainly increases, a fraction of the cost did not change, while no cost increased.

The ‘Statements that will be affected’ area at the bottom of the ‘What-If’ tab displays the expected improvement by all SQL statements that access the top table ‘ORDER_LINE’. The data grid lists the SQL statements in the order of their time spent in the SQL Server database. The top SQL statement identified by ‘20144’ can improve by some 99%. For the more than 10 hours of time spent on using CPU in the SQL Server database, this improvement corresponds to more than 10 hours that will have a significant impact on processing. The improvement will save money for Information Technology and allow business transactions to complete faster while consuming fewer resources.

Figure 4: The ‘What-If’ subtab of the ‘Recommend’ tab of the ‘SQL’ workspace for the top SQL statement.

Figure 4: The ‘What-If’ subtab of the ‘Recommend’ tab of the ‘SQL’ workspace for the top SQL statement.

Findings

It appears that the application spends the majority of the processing time in the SQL Server database. Accessing busy tables consumes resources.

Summary

Precise showed that the SQL Server database was very CPU intensive. Precise then narrowed down the performance problem to a specific database object and then to a particular SQL statement. Precise then provided recommendations and What-If Analysis for the suggestions. The analysis showed that the performance would improve significantly. Consequently, the maintenance and modifications of the configuration of the database allowed for more efficient and faster access to the SQL Server database.

For Precise for Databases, you may want to browse the product web pages, watch the overview video for Precise for SQL Server, read the datasheet, view TechValidate survey results for a Global 500 banking company, request a live demonstration, and request a price quotation.