SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
Managing Test Data and Stress
Testing Your SQL Applications
       Speaker: Joel Champagne



     San Francisco SQL Server User Group
              January 12, 2011




        Mark Ginnebaugh, User Group Leader
               www.bayareasql.org
Tonight’s Speaker
        g      p

   Joel Champagne
     Developer  of large enterprise applications for 20 years
     Focus on data, in particular using the Microsoft stack (SS*S)
                                                             (SS S)
      and .NET
     Involved in all stages of application life-cycle, from
      envisioning through implementation
     Areas of Interest:
             Tool development work
             Developer productivity

    Tonight’s T i Managing Test D t and Stress Testing
    T i ht’ Topic: M     i T t Data d St       T ti
     Your SQL Applications
Upcoming Training 
              Upcoming Training
• Upcoming full‐day training (minimal cost, target is 
    p      g       y       g(             , g
  late Feb or March 2011):  
  www.codexframework.com/training
   –   SQL Source Control
       SQL Source Control
   –   Stress/Volume Testing
   –   SQL Unit Testing
   –   SQL‐Hero – more details (www.codexframework.com)

• Email Joel:  joelc@codexframework.com
       l    l     l    d f        k
• Twitter:  @sqlheroguy
What I want to cover…
          What I want to cover…
•   The why & how
    The why & how
•   Large data volumes – benefits, practical looks
•   Specific examples, in detail
    S ifi            l i d il
•   Obfuscation of existing data
•   Load testing
•   Both MS and non MS options
    Both MS and non‐MS options
•   Let’s keep it interactive
In the beginning…
             In the beginning…
• … of the development process
  … of the development process
  – We can know characteristics of entities
  – We can know ways to optimize (e.g. indexes)
                   y      p        ( g        )
  – We can have good intentions
• Ultimately, the little details matter:
  Ultimately, the little details matter:
  – Style counts! – not always shortest or most 
    elegant performs best
  – SQL can seem like an art instead of a science 
    sometimes
Problem is…
                   Problem is…
• How can we know what we’ve got is going to:
   o ca e o         at e e got s go g to:
   – Perform well, not just as we develop, but years from 
     now, in production
   – Perform well if reality changes
   – Actually  behave as expected with lots of data
• A d
  And, we’d like to:
         ’d lik t
   – Work with semi‐realistic data, even before users have 
     had a chance to do a lot of interaction with the app
     had a chance to do a lot of interaction with the app
   – In some cases may want to work with a “well known” 
     data set, to support repeatable unit & system testing
Solutions
• VS 2010
  VS 2010
  – Database project ‐> Data Generation Plan
  – Premium/Ultimate
            /
  – Custom generator extensibility
• SQL‐Hero
  SQL Hero
  – Generate data option
• Others
  – Custom developed (scripting, bcp, PowerShell, 
    etc.)
Things to consider…
           Things to consider…
• “Realism”
   Realism
  – Cardinality
  – Use of NULL
  – Foreign key lookups
  – Implied rules (sequence number example)
       p          ( q                     p )
  – … essentially rules at both column and table level 
    (constraints)
  – Names, addresses, etc. – pros, cons
• Deterministic vs. True Random
Understanding reality…
               Understanding reality…
Cardinality:
Scenario #1
                Scenario #1
• New development effort empty database
  New development effort, empty database
• We have a search screen we’ve written –
  seems like it s fast but not a lot of data
  seems like it’s fast but not a lot of data
• … what about 3 years from now?
  – 12,000,000+ Customers
  – 26,000,000+ Orders
  – 16,500,000 Addresses
Options #1
               Options #1
• VS 2010
  VS 2010
• SQL‐Hero

• Data Model
• Demos
Scenario #2
                      Scenario #2
• Let’s take an end‐to‐end look at a “real example” 
   et s ta e a e d to e d oo at a ea e a p e
  from a customer…
  – Team structure
  – “The strategy”
       • A fourth database, user participation
  –   Design doc from BA
      Design doc from BA
  –   The process of creating data and testing
  –   Tuning efforts
      Tuning efforts
  –   Re‐testing
  –   Conclusions…
Scenario #3
                  Scenario #3
• Large database, on‐going development work, 
     g           ,   g g            p          ,
  post‐implementation
• As we try to modify or fix bugs, some issues rely 
  on production‐quality data
  on production quality data
• Option:  Copy prod to dev/QA
• Problems:
   – Security
   – Coordinating with on‐going dev work
• Another scenario:  just looking to add more data 
  to an existing DB
Options #3
                 Options #3
• VS 2010
  VS 2010
  – Data Transformation
• SQL Hero
  SQL‐Hero
  – “Scramble” existing data option


• Demos
Issue here:  Assumes inherently that should reseed…

Conclusions…
‐ Data generation plans are very extensible (due to custom generators and such)
but do have limitations:  prepare to invest some time in getting them “just right”
Scenario #4
                 Scenario #4
• Actual “stress testing”, being high concurrent 
  Actual  stress testing being high concurrent
  load
• Need to understand the results of high load
  Need to understand the results of high load
  – Slowness
  – Of
    Often times, blocking
            i    bl ki
  – Sometimes deadlocks we didn’t anticipate
  – Have seen lead to on‐going monitoring, tuning 
    efforts
Options #4
• SQLIO
   – SQLIOStress creates separate data and log files to simulate the I/O 
     patterns that SQL Server will generate to its data file (.mdf) and its log file 
     (.ldf). SQLIOStress does not use the SQL Server engine to perform the 
     (.ldf). SQLIOStress does not use the SQL Server engine to perform the
     stress activity so it can be used to exercise a computer before you install 
     SQL Server." (From SQLIOStress Readme.doc)
• SQL Profiler
   – C
     Can collect a workload and “replay”
           ll         kl d d “ l ”
• VS 2010
   – Extensive Load Testing support – Test rigs, multiple agents possible
   – Invocation of test cases in NET pros and cons
     Invocation of test cases in .NET – pros and cons
• SQL‐Hero
   – Executing script with concurrency option – generate high load using “real” 
     trace  simple, visualization for results 
     trace – simple, visualization for results ‐ successful
   – Data visualization of collected trace information (often the key in analysis)
   – Data visualization of trace information, over longer timeframes
   – Production monitoring   g
   – Screen shots:  daily life examples
   – Future:  Template to build web test code to invoke from VS2010 test rig
Putting it together…
            Putting it together…
• Build process
   u d p ocess
  – Build DB from SC ‐> Populate Fully ‐> Use
     • Advantage:  you know will match source of truth
     • Disadvantage:  longer‐term testing, relying on existing data
  – Scripting / automation
  – Microsoft guidance doc:
    Microsoft guidance doc: 
    http://vsdatabaseguide.codeplex.com
  – Hybrid options common
• Another important element:  Unit testing
  – Knowing if something becomes broken, early
To learn more or inquire about speaking opportunities, please
                   q            p     g pp           ,p
                           contact:

Mark Ginnebaugh, User Group Leader mark@designmind.com

Mais conteúdo relacionado

Mais procurados

How To Buy Data Warehouse
How To Buy Data WarehouseHow To Buy Data Warehouse
How To Buy Data Warehouse
Eric Sun
 
Building a data warehouse of call data records
Building a data warehouse of call data recordsBuilding a data warehouse of call data records
Building a data warehouse of call data records
David Walker
 

Mais procurados (20)

Using SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS CubesUsing SSRS Reports with SSAS Cubes
Using SSRS Reports with SSAS Cubes
 
Pervasive analytics through data & analytic centricity
Pervasive analytics through data & analytic centricityPervasive analytics through data & analytic centricity
Pervasive analytics through data & analytic centricity
 
Building Data Warehouse in SQL Server
Building Data Warehouse in SQL ServerBuilding Data Warehouse in SQL Server
Building Data Warehouse in SQL Server
 
Data Vault Automation at the Bijenkorf
Data Vault Automation at the BijenkorfData Vault Automation at the Bijenkorf
Data Vault Automation at the Bijenkorf
 
Demystifying Data Warehouse as a Service (DWaaS)
Demystifying Data Warehouse as a Service (DWaaS)Demystifying Data Warehouse as a Service (DWaaS)
Demystifying Data Warehouse as a Service (DWaaS)
 
White paper making an-operational_data_store_(ods)_the_center_of_your_data_...
White paper   making an-operational_data_store_(ods)_the_center_of_your_data_...White paper   making an-operational_data_store_(ods)_the_center_of_your_data_...
White paper making an-operational_data_store_(ods)_the_center_of_your_data_...
 
Building an Effective Data Warehouse Architecture
Building an Effective Data Warehouse ArchitectureBuilding an Effective Data Warehouse Architecture
Building an Effective Data Warehouse Architecture
 
Big Data Testing Approach - Rohit Kharabe
Big Data Testing Approach - Rohit KharabeBig Data Testing Approach - Rohit Kharabe
Big Data Testing Approach - Rohit Kharabe
 
Demystifying Data Warehousing as a Service (GLOC 2019)
Demystifying Data Warehousing as a Service (GLOC 2019)Demystifying Data Warehousing as a Service (GLOC 2019)
Demystifying Data Warehousing as a Service (GLOC 2019)
 
Testing the Data Warehouse―Big Data, Big Problems
Testing the Data Warehouse―Big Data, Big ProblemsTesting the Data Warehouse―Big Data, Big Problems
Testing the Data Warehouse―Big Data, Big Problems
 
Tuning data warehouse
Tuning data warehouseTuning data warehouse
Tuning data warehouse
 
DATASTAGE AND QUALITY STAGE 9.1 ONLINE TRAINING
DATASTAGE AND QUALITY STAGE 9.1 ONLINE TRAININGDATASTAGE AND QUALITY STAGE 9.1 ONLINE TRAINING
DATASTAGE AND QUALITY STAGE 9.1 ONLINE TRAINING
 
Data Warehouse Design on Cloud ,A Big Data approach Part_One
Data Warehouse Design on Cloud ,A Big Data approach Part_OneData Warehouse Design on Cloud ,A Big Data approach Part_One
Data Warehouse Design on Cloud ,A Big Data approach Part_One
 
Data Virtualization and ETL
Data Virtualization and ETLData Virtualization and ETL
Data Virtualization and ETL
 
How to Achieve Fast Data Performance in Big Data, Logical Data Warehouse, and...
How to Achieve Fast Data Performance in Big Data, Logical Data Warehouse, and...How to Achieve Fast Data Performance in Big Data, Logical Data Warehouse, and...
How to Achieve Fast Data Performance in Big Data, Logical Data Warehouse, and...
 
How To Buy Data Warehouse
How To Buy Data WarehouseHow To Buy Data Warehouse
How To Buy Data Warehouse
 
Role of MySQL in Data Analytics, Warehousing
Role of MySQL in Data Analytics, WarehousingRole of MySQL in Data Analytics, Warehousing
Role of MySQL in Data Analytics, Warehousing
 
Roland bouman modern_data_warehouse_architectures_data_vault_and_anchor_model...
Roland bouman modern_data_warehouse_architectures_data_vault_and_anchor_model...Roland bouman modern_data_warehouse_architectures_data_vault_and_anchor_model...
Roland bouman modern_data_warehouse_architectures_data_vault_and_anchor_model...
 
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...
Denodo Data Virtualization Platform: Overview (session 1 from Architect to Ar...
 
Building a data warehouse of call data records
Building a data warehouse of call data recordsBuilding a data warehouse of call data records
Building a data warehouse of call data records
 

Semelhante a SQL Server Managing Test Data & Stress Testing January 2011

Wei's Self Intro
Wei's Self IntroWei's Self Intro
Wei's Self Intro
sunmast
 
Bb world 2012 using database statistics to make capacity planning decisions...
Bb world 2012   using database statistics to make capacity planning decisions...Bb world 2012   using database statistics to make capacity planning decisions...
Bb world 2012 using database statistics to make capacity planning decisions...
Geoff Mower
 

Semelhante a SQL Server Managing Test Data & Stress Testing January 2011 (20)

Data DevOps: An Overview
Data DevOps: An OverviewData DevOps: An Overview
Data DevOps: An Overview
 
Making Data Science Scalable - 5 Lessons Learned
Making Data Science Scalable - 5 Lessons LearnedMaking Data Science Scalable - 5 Lessons Learned
Making Data Science Scalable - 5 Lessons Learned
 
A Maturing Role of Workflows in the Presence of Heterogenous Computing Archit...
A Maturing Role of Workflows in the Presence of Heterogenous Computing Archit...A Maturing Role of Workflows in the Presence of Heterogenous Computing Archit...
A Maturing Role of Workflows in the Presence of Heterogenous Computing Archit...
 
My C.V
My C.VMy C.V
My C.V
 
Connecting the dots mbse process dec02 2015
Connecting the dots mbse process dec02 2015Connecting the dots mbse process dec02 2015
Connecting the dots mbse process dec02 2015
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1
 
Building a Testable Data Access Layer
Building a Testable Data Access LayerBuilding a Testable Data Access Layer
Building a Testable Data Access Layer
 
How Celtra Optimizes its Advertising Platform with Databricks
How Celtra Optimizes its Advertising Platformwith DatabricksHow Celtra Optimizes its Advertising Platformwith Databricks
How Celtra Optimizes its Advertising Platform with Databricks
 
D Maeda Bi Portfolio
D Maeda Bi PortfolioD Maeda Bi Portfolio
D Maeda Bi Portfolio
 
Architecting for Data Science
Architecting for Data ScienceArchitecting for Data Science
Architecting for Data Science
 
Performance Optimization of Cloud Based Applications by Peter Smith, ACL
Performance Optimization of Cloud Based Applications by Peter Smith, ACLPerformance Optimization of Cloud Based Applications by Peter Smith, ACL
Performance Optimization of Cloud Based Applications by Peter Smith, ACL
 
Wei's Self Intro
Wei's Self IntroWei's Self Intro
Wei's Self Intro
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
 
Cloudera Breakfast Series, Analytics Part 1: Use All Your Data
Cloudera Breakfast Series, Analytics Part 1: Use All Your DataCloudera Breakfast Series, Analytics Part 1: Use All Your Data
Cloudera Breakfast Series, Analytics Part 1: Use All Your Data
 
OSA Con 2022 - Scaling your Pandas Analytics with Modin - Doris Lee - Ponder.pdf
OSA Con 2022 - Scaling your Pandas Analytics with Modin - Doris Lee - Ponder.pdfOSA Con 2022 - Scaling your Pandas Analytics with Modin - Doris Lee - Ponder.pdf
OSA Con 2022 - Scaling your Pandas Analytics with Modin - Doris Lee - Ponder.pdf
 
Silicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The SequelSilicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
Silicon Valley Code Camp 2015 - Advanced MongoDB - The Sequel
 
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
Lessons Learned Replatforming A Large Machine Learning Application To Apache ...
 
Doing Analytics Right - Building the Analytics Environment
Doing Analytics Right - Building the Analytics EnvironmentDoing Analytics Right - Building the Analytics Environment
Doing Analytics Right - Building the Analytics Environment
 
Bb world 2012 using database statistics to make capacity planning decisions...
Bb world 2012   using database statistics to make capacity planning decisions...Bb world 2012   using database statistics to make capacity planning decisions...
Bb world 2012 using database statistics to make capacity planning decisions...
 
Data Engineer's Lunch #85: Designing a Modern Data Stack
Data Engineer's Lunch #85: Designing a Modern Data StackData Engineer's Lunch #85: Designing a Modern Data Stack
Data Engineer's Lunch #85: Designing a Modern Data Stack
 

Mais de Mark Ginnebaugh

Mais de Mark Ginnebaugh (20)

Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015Automating Microsoft Power BI Creations 2015
Automating Microsoft Power BI Creations 2015
 
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
Microsoft SQL Server Analysis Services (SSAS) - A Practical Introduction
 
Platfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big DataPlatfora - An Analytics Sandbox In A World Of Big Data
Platfora - An Analytics Sandbox In A World Of Big Data
 
Microsoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary KeysMicrosoft SQL Server Relational Databases and Primary Keys
Microsoft SQL Server Relational Databases and Primary Keys
 
DesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL ServerDesignMind Microsoft Business Intelligence SQL Server
DesignMind Microsoft Business Intelligence SQL Server
 
San Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetingsSan Francisco Bay Area SQL Server July 2013 meetings
San Francisco Bay Area SQL Server July 2013 meetings
 
Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013Silicon Valley SQL Server User Group June 2013
Silicon Valley SQL Server User Group June 2013
 
Microsoft SQL Server Continuous Integration
Microsoft SQL Server Continuous IntegrationMicrosoft SQL Server Continuous Integration
Microsoft SQL Server Continuous Integration
 
Hortonworks Big Data & Hadoop
Hortonworks Big Data & HadoopHortonworks Big Data & Hadoop
Hortonworks Big Data & Hadoop
 
Microsoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join OperatorsMicrosoft SQL Server Physical Join Operators
Microsoft SQL Server Physical Join Operators
 
Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013Microsoft PowerPivot & Power View in Excel 2013
Microsoft PowerPivot & Power View in Excel 2013
 
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball ApproachMicrosoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
Microsoft Data Warehouse Business Intelligence Lifecycle - The Kimball Approach
 
Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012Fusion-io Memory Flash for Microsoft SQL Server 2012
Fusion-io Memory Flash for Microsoft SQL Server 2012
 
Microsoft Data Mining 2012
Microsoft Data Mining 2012Microsoft Data Mining 2012
Microsoft Data Mining 2012
 
Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012Microsoft SQL Server PASS News August 2012
Microsoft SQL Server PASS News August 2012
 
Business Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best PracticesBusiness Intelligence Dashboard Design Best Practices
Business Intelligence Dashboard Design Best Practices
 
Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence Microsoft Mobile Business Intelligence
Microsoft Mobile Business Intelligence
 
Microsoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud ReadyMicrosoft SQL Server 2012 Cloud Ready
Microsoft SQL Server 2012 Cloud Ready
 
Microsoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data ServicesMicrosoft SQL Server 2012 Master Data Services
Microsoft SQL Server 2012 Master Data Services
 
Microsoft SQL Server PowerPivot
Microsoft SQL Server PowerPivotMicrosoft SQL Server PowerPivot
Microsoft SQL Server PowerPivot
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

SQL Server Managing Test Data & Stress Testing January 2011

  • 1. Managing Test Data and Stress Testing Your SQL Applications Speaker: Joel Champagne San Francisco SQL Server User Group January 12, 2011 Mark Ginnebaugh, User Group Leader www.bayareasql.org
  • 2. Tonight’s Speaker g p  Joel Champagne  Developer of large enterprise applications for 20 years  Focus on data, in particular using the Microsoft stack (SS*S) (SS S) and .NET  Involved in all stages of application life-cycle, from envisioning through implementation  Areas of Interest:  Tool development work  Developer productivity Tonight’s T i Managing Test D t and Stress Testing T i ht’ Topic: M i T t Data d St T ti Your SQL Applications
  • 3. Upcoming Training  Upcoming Training • Upcoming full‐day training (minimal cost, target is  p g y g( , g late Feb or March 2011):   www.codexframework.com/training – SQL Source Control SQL Source Control – Stress/Volume Testing – SQL Unit Testing – SQL‐Hero – more details (www.codexframework.com) • Email Joel:  joelc@codexframework.com l l l d f k • Twitter:  @sqlheroguy
  • 4. What I want to cover… What I want to cover… • The why & how The why & how • Large data volumes – benefits, practical looks • Specific examples, in detail S ifi l i d il • Obfuscation of existing data • Load testing • Both MS and non MS options Both MS and non‐MS options • Let’s keep it interactive
  • 5. In the beginning… In the beginning… • … of the development process … of the development process – We can know characteristics of entities – We can know ways to optimize (e.g. indexes) y p ( g ) – We can have good intentions • Ultimately, the little details matter: Ultimately, the little details matter: – Style counts! – not always shortest or most  elegant performs best – SQL can seem like an art instead of a science  sometimes
  • 6. Problem is… Problem is… • How can we know what we’ve got is going to: o ca e o at e e got s go g to: – Perform well, not just as we develop, but years from  now, in production – Perform well if reality changes – Actually  behave as expected with lots of data • A d And, we’d like to: ’d lik t – Work with semi‐realistic data, even before users have  had a chance to do a lot of interaction with the app had a chance to do a lot of interaction with the app – In some cases may want to work with a “well known”  data set, to support repeatable unit & system testing
  • 7. Solutions • VS 2010 VS 2010 – Database project ‐> Data Generation Plan – Premium/Ultimate / – Custom generator extensibility • SQL‐Hero SQL Hero – Generate data option • Others – Custom developed (scripting, bcp, PowerShell,  etc.)
  • 8. Things to consider… Things to consider… • “Realism” Realism – Cardinality – Use of NULL – Foreign key lookups – Implied rules (sequence number example) p ( q p ) – … essentially rules at both column and table level  (constraints) – Names, addresses, etc. – pros, cons • Deterministic vs. True Random
  • 9. Understanding reality… Understanding reality… Cardinality:
  • 10. Scenario #1 Scenario #1 • New development effort empty database New development effort, empty database • We have a search screen we’ve written – seems like it s fast but not a lot of data seems like it’s fast but not a lot of data • … what about 3 years from now? – 12,000,000+ Customers – 26,000,000+ Orders – 16,500,000 Addresses
  • 11. Options #1 Options #1 • VS 2010 VS 2010 • SQL‐Hero • Data Model • Demos
  • 12.
  • 13. Scenario #2 Scenario #2 • Let’s take an end‐to‐end look at a “real example”  et s ta e a e d to e d oo at a ea e a p e from a customer… – Team structure – “The strategy” • A fourth database, user participation – Design doc from BA Design doc from BA – The process of creating data and testing – Tuning efforts Tuning efforts – Re‐testing – Conclusions…
  • 14.
  • 15.
  • 16.
  • 17. Scenario #3 Scenario #3 • Large database, on‐going development work,  g , g g p , post‐implementation • As we try to modify or fix bugs, some issues rely  on production‐quality data on production quality data • Option:  Copy prod to dev/QA • Problems: – Security – Coordinating with on‐going dev work • Another scenario:  just looking to add more data  to an existing DB
  • 18. Options #3 Options #3 • VS 2010 VS 2010 – Data Transformation • SQL Hero SQL‐Hero – “Scramble” existing data option • Demos
  • 20. Scenario #4 Scenario #4 • Actual “stress testing”, being high concurrent  Actual  stress testing being high concurrent load • Need to understand the results of high load Need to understand the results of high load – Slowness – Of Often times, blocking i bl ki – Sometimes deadlocks we didn’t anticipate – Have seen lead to on‐going monitoring, tuning  efforts
  • 21. Options #4 • SQLIO – SQLIOStress creates separate data and log files to simulate the I/O  patterns that SQL Server will generate to its data file (.mdf) and its log file  (.ldf). SQLIOStress does not use the SQL Server engine to perform the  (.ldf). SQLIOStress does not use the SQL Server engine to perform the stress activity so it can be used to exercise a computer before you install  SQL Server." (From SQLIOStress Readme.doc) • SQL Profiler – C Can collect a workload and “replay” ll kl d d “ l ” • VS 2010 – Extensive Load Testing support – Test rigs, multiple agents possible – Invocation of test cases in NET pros and cons Invocation of test cases in .NET – pros and cons • SQL‐Hero – Executing script with concurrency option – generate high load using “real”  trace  simple, visualization for results  trace – simple, visualization for results ‐ successful – Data visualization of collected trace information (often the key in analysis) – Data visualization of trace information, over longer timeframes – Production monitoring g – Screen shots:  daily life examples – Future:  Template to build web test code to invoke from VS2010 test rig
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Putting it together… Putting it together… • Build process u d p ocess – Build DB from SC ‐> Populate Fully ‐> Use • Advantage:  you know will match source of truth • Disadvantage:  longer‐term testing, relying on existing data – Scripting / automation – Microsoft guidance doc: Microsoft guidance doc:  http://vsdatabaseguide.codeplex.com – Hybrid options common • Another important element:  Unit testing – Knowing if something becomes broken, early
  • 28. To learn more or inquire about speaking opportunities, please q p g pp ,p contact: Mark Ginnebaugh, User Group Leader mark@designmind.com