Upload
comunidade-netponto
View
2.264
Download
1
Embed Size (px)
DESCRIPTION
Citation preview
Who needs Stored Procedures anyway?Niko Neugebauer
http://netponto.org23ª Reunião Lisboa - 24/09/2011
Patrocinadores desta reunião
Niko NeugebauerSQL Server MVPMCITP Developer 2005Líder e fundador da comunidade SQLPort (http://www.sqlport.com)Mentor Regional PASS para «Western Europe» Consultor da Novabase
Agenda
• Query Analizer• Queries (aka «Ad Hoc»)• Parametrization: Simple/Forced• Stored Procedures• Memory• Justin Bieber
Query Analizer
• Analise do Query, Compilação, Geração do plano e ... Execução
QueryPlano de Execução
Compiler
Memory
• I just can’t get enough• I just can’t get enough• ....• I just can’t get enough• I just can’t get enough
Queries «Ad Hoc»
Demo
Parametrization
• Simple• Forced
Stored Procs
• In da House• É como Java vs Native Code
Memory
• SQL Server 2008 and SQL Server 2005 SP2 * 75% of visible target memory from 0-4GB + 10% of visible target memory from 4Gb-64GB + 5% of visible target memory > 64GB
• SQL Server 2005 RTM and SQL Server 2005 SP1 * 75% of visible target memory from 0-8GB + 50% of visible target memory from 8Gb-64GB + 25% of visible target memory > 64GB
• SQL Server 2000 * SQL Server 2000 4GB upper cap on the plan cache
Optimizaçãoexec sp_configure 'show advanced options', 1;reconfigure;
exec sp_configure 'optimize for ad hoc workloads', 1Reconfigure;
ReferênciasProcedure Cache and Optimization for Adhoc Workloads(Kim Tripp)
– http://www.sqlskills.com/BLOGS/KIMBERLY/post/Procedure-cache-and-optimizing-for-adhoc-workloads.aspx
Query Parametrization– http://
weblogs.sqlteam.com/dang/archive/2009/06/27/Forced-Parameterization-A-Turbo-Button.aspx
Questões?
Patrocinadores desta reunião
Próximas reuniões presenciais
• 24/09/2011 – Setembro (2 anos!)• 29/10/2011 – Outubro• 19/11/2011 – Outubro (Coimbra)• 26/11/2011 – Novembro
Reserva estes dias na agenda! :)
Obrigado!
Niko [email protected]://pt.linkedin.com/in/webcaravelahttp://sqlport.comhttp://twitter.com/NikoNeugebauer