Download Cause - Dynatrace Community

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft Access wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Concurrency control wikipedia , lookup

Database wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Ingres (database) wikipedia , lookup

Open Database Connectivity wikipedia , lookup

SQL wikipedia , lookup

Clusterpoint wikipedia , lookup

PL/SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Database model wikipedia , lookup

Relational model wikipedia , lookup

Transcript
VA Nucleus DB Maintenance Task Performance
Cause:
Following a restart of the Nucleus service, a database cleanup task was taking 24+ hours to complete.
This is due to foreign key constraints (FK).
From Nucleus Log:
011-10-20 09:50:39,586[StatsMonitorThread]INFO AgentMsgProcessorFactory -: Initializing Threaded
message processor
2011-10-20 09:50:45,824[WrapperSimpleAppMain]INFO DeleteMetaDataDb -: 37 rows removed from
url
2011-10-20 09:51:46,682[WrapperSimpleAppMain]INFO DeleteMetaDataDb -: 84 rows removed from
url
...
2011-10-21 09:32:38,193[WrapperSimpleAppMain]INFO DeleteMetaDataDb -: 60511 rows removed
from url
2011-10-21 09:33:39,274[WrapperSimpleAppMain]INFO DeleteMetaDataDb -: 60553 rows removed
from url
2011-10-21 09:34:40,622[WrapperSimpleAppMain]INFO DeleteMetaDataDb -: 60595 rows removed
from url
...
Impact:
This resulted in the following issues
1. Could not access the Nucleus server from the Java/.Net Performance Console.
2. VAS processing of vdata files was taking about 3 minutes (sub 1 second is normal).
3. Method data from VA not available in VAS reports.
Solution:
Run the following scripts to tune the VA database for better performance
1. Stop Nucleus Service
2. In SQL Server where the Vantage Analyzer Nucleus Database resides, use the 'Display Estimated
Execution Plan' (a feature in MS SQL Server) to run the following statement:
(sql1.jpg)
Run ' delete from vantage.url ' (Verify that the table is named vantage.url) using the 'Display
Estimated Execution Plan' (DEP) button (see sql1.jpg) (DO NOT use "Execute" here)
Below you will see an example of a DEP. If you see any Clustered index scans (see sql2.jpg) please
note which table(s) they are coming from as we need to delete these foreign key constraints that
are slowing the cleanup process down.
(sql2.jpg)
2. The following SQL statements will delete the FK to allow for a quicker cleanup (Use Execute to run
these statements){Replace with keys shown in your plan}:
alter table vantage.aggregate
drop constraint fk_aggregate_ip_id, fk_aggregate_url_id, fk_aggregate_user_id;
alter table vantage.tscope_header_only
drop constraint fk_tscope_hdr_ip_id, fk_tscope_hdr_url_id, fk_tscope_hdr_user_id;
3. Repeat step 2 above to "Display Estimated Execution Plan" to ensure that the path is now a
straight line like the following screenshot:
(sql3.jpg)
4. Start the Nucleus Service.
5. In the following example the database cleanup took about 4 minutes to complete after removing
the FK constraints:
2011-10-21 09:38:34,960[WrapperSimpleAppMain]INFO DeleteMetaDataDb -:
removed from url
33867 rows
2011-10-21 09:39:34,964[WrapperSimpleAppMain]INFO
removed from url
2011-10-21 09:40:34,965[WrapperSimpleAppMain]INFO
removed from url
2011-10-21 09:41:34,973[WrapperSimpleAppMain]INFO
removed from url
2011-10-21 09:42:22,249[WrapperSimpleAppMain]INFO
183563 rows in 4 min 47 s 289 ms
DeleteMetaDataDb -:
71734 rows
DeleteMetaDataDb -:
111037 rows
DeleteMetaDataDb -:
151376 rows
DeleteMetaDataDb -:
- url - removed