By Shanna Epstein IS 257 September 16, 2008. Cnet.com Provides information, tools, and advice to help customers decide what to buy and how to get the.

Slides:



Advertisements
Similar presentations
Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
Advertisements

Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
EXECUTION PLANS By Nimesh Shah, Amit Bhawnani. Outline  What is execution plan  How are execution plans created  How to get an execution plan  Graphical.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Computer Monitoring System for EE Faculty By Yaroslav Ross And Denis Zakrevsky Supervisor: Viktor Kulikov.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 11: Monitoring Server Performance.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Chapter 7 Advanced SQL Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
HORIZONT 1 TWS/WebAdmin Tips & Tricks HORIZONT Software for Datacenters Garmischer Str. 8 D München Tel ++49(0)89 /
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Passage Three Introduction to Microsoft SQL Server 2000.
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
SQL Server 2005 SP2 Israeli SQL Server User Group March 2005 Ami Levin
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
Overview What is SQL Server? Creating databases Administration Security Backup.
Module 1: Introduction to Microsoft SQL Server 7.0.
Chapter 2. Creating the Database Environment
Introduction to Databases Chapter 8: Improving Data Access.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Database Management. ICT5 Database Administration (DBA) The DBA’s tasks will include the following: 1. The design of the database. After the initial design,
Improving Efficiency of I/O Bound Systems More Memory, Better Caching Newer and Faster Disk Drives Set Object Access (SETOBJACC) Reorganize (RGZPFM) w/
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Agenda for Today Do Chapter 14 Final Project Review for Final.
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
A Brief Documentation.  Provides basic information about connection, server, and client.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
Learningcomputer.com SQL Server 2008 –Views, Functions and Stored Procedures.
Stored Procedure Optimization Preventing SP Time Out Delay Deadlocking More DiskReads By: Nix.
Creating Indexes on Tables An index provides quick access to data in a table, based on the values in specified columns. A table can have more than one.
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
Table Structures and Indexing. The concept of indexing If you were asked to search for the name “Adam Wilbert” in a phonebook, you would go directly to.
5 Copyright © 2008, Oracle. All rights reserved. Testing and Validating a Repository.
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
SQL Triggers, Functions & Stored Procedures Programming Operations.
LOAD RUNNER. Product Training Load Runner 3 Examples of LoadRunner Performance Monitors Internet/Intranet Database server App servers Web servers Clients.
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS. M.Sc. and B.Sc. of Information Technology Engineering Senior Lecturer in University of Somalia,
Microsoft SQL is known as RDMS (Relational Database Management System) which is developed by Microsoft and is highly used at corporate and enterprise.
SQL Advanced Monitoring Using DMV, Extended Events and Service Broker Javier Villegas – DBA | MCP | MCTS.
SQL Database Management
Dynamic SQL Writing Efficient Queries on the Fly
Indexes By Adrienne Watt.
HORIZONT TWS/WebAdmin DS TWS/WebAdmin DS Tips & Tricks
SQL Server Monitoring Overview
Introduction to SQL Server Management for the Non-DBA
Database Performance Tuning and Query Optimization
The Vocabulary of Performance Tuning
The PROCESS of Queries John Deardurff
The PROCESS of Queries John Deardurff Website: ThatAwesomeTrainer.com
The PROCESS of Queries John Deardurff
The Vocabulary of Performance Tuning
Chapter 11 Database Performance Tuning and Query Optimization
Chapter 11 Managing Databases with SQL Server 2000
The Vocabulary of Performance Tuning
Sql Saturday Philadelphia
Presentation transcript:

By Shanna Epstein IS 257 September 16, 2008

Cnet.com Provides information, tools, and advice to help customers decide what to buy and how to get the most out of technology: News Reviews Downloads

Cnet.com Other Sites Cnet.com Bnet.com Zdnet.com Gamespot.com TV.com Chow

Job Responsibilities Software Engineer for Trax Lead team of 2 developers Responsible for development and maintenance of product Support Windows servers Support php websites and SQL Server 2005 databases

What is Trax? Industry’s most advanced tool for Tracking Analyzing Entertainment Data Consumer Awareness Interest and Purchase Intent Competitive Mindshare Ad campaign effectiveness Audience profiles Editorial coverage

Data Sources Gamespot (Gamespot Trax) Gamespot.com GameRankings.com Download.com TV (TV Trax) tv.com MovieTome (Trax coming soon) movietome.com MP3 – Juke (Trax coming soon) juke.com (coming out soon)

Metrics About 20 total Most important: Users/Avg. Daily Users (by Sessions) Page Views (hits of pages) Searches (execute search for a game) New Trackers/Total Trackers (track games in Favorites) Downloads Videos

Data Processing Stage servers process heavy jobs at night and early morning data comes from various sources direct database queries text file feeds xml feeds replicate to production early in the morning replicate to development in off hours

Architecture Development Code: developer PCs (php) Database server: SQL Server2005 Staging (data processing, replication, testing) Windows server, SQL Server 2005, Apache 2 servers: Gamespot Trax, TV Trax Production Windows server, SQL Server 2005, Apache 2 servers: Gamespot Trax, TV Trax

Database Maintenance Optimization Jobs scheduled in SQL Server Job Agent consists of several steps involving: Job status can be retrieved through queries against the Master db DBA can be notified of success/failure through user interface or s 1 st step checks whether job already completed successfully today 2 nd step checks whether dependent jobs completed Later steps consist of php scripts (read and process data, send s, etc) and SQL queries

Controlling Database Processes Task Manager on Windows Server monitors CPU usage SQL Server Activity Monitor - ad hoc monitoring tool Allows to determine volume and general types of activities lists user connections, locks, open, and blocked transactions SQL Query Profiler - query optimizer allows to trace queries for analysis and catch query bottlenecks Logging Automatic system error logging Database consists of data and log file

Optimizing Database Performance Caching Saves frequently used information into an easy to get to area (usually memory) Reduces disk access, computation (CPU), and speeds up query results Indexes Data structure that improves speed of operations on db table Sorted by key values Query Syntax tips and tricks Good database design normalization Data cleaning Old and unused records

Optimizing query performance Types of Database Caching Ad hoc - not cached Easy to debug, but same query executed every time Parameterized queries - cached queries Replace constant literal values by variables, and compiles query plans. If subsequent query differs in only values of constants, it will match against auto-parameterized query. Prepare statements – cached handles batch text is sent once at "prepare" time. SQL Server responds by returning handle that can be used to invoke the batch at execute time. At execute time, a handle and parameter values are sent to server. Stored procedures - cached parameter sniffing When stored procedure is compiled for first time, values of parameters supplied with execution call are used to optimize statements within that stored procedure. This process is known as "parameter sniffing." If these values are typical, then most calls to that stored procedure will benefit from stored procedures.

Optimizing Query Performance Indexes Clustered Defines physical storing of rows (reorders how records are physically stored) Each table can have one clustered index If clustered index not defined, usually Primary Key becomes clustered index automatically Non-Clustered logical order of the index does not match the physical stored order of the rows on disk Contains references to sorting Slows down modification and insertion process, so keep to a minimum Good candidates for non-clustered indexes are those columns frequently used in WHERE, GROUP BY, and HAVING SQL Server’s Tuning Wizard recommends indexes after running SQL Server Profiler (query optimization tool that traces queries)

Optimizing Query Performance Syntax tricks Avoid joining tables on non-indexed columns Most expensive operation SQL Server can do Specify columns in select statements instead of SELECT * Try to avoid DISTINCT when possible Restrict with WHERE clauses Select TOP number of rows Experiment with switching ORDER BY column positions

Optimizing Query Performance (Syntax tricks - cont.) Union ALL faster than Union UNION ALL does not look for duplicate rows, and UNION statement does look for duplicate rows, whether or not they exist SET NOCOUNT ON – stored procedures Stops message indicating number of rows and reduces network traffic because message with number of rows retrieved is not displayed to client

Backup and Restore Procedures IT backups Stored on tape Ship to offsite Backup requested when needed SQL Server runs nightly backups Backups stored on server and replaced by new versions Types of files backed up: Master file stores system information, user logons, user permissions, etc. Msdb file stores job content and scheduling information Other database files

Conclusion Questions?