SlideShare a Scribd company logo
1 of 29
Download to read offline
XII Encontro da comunidade SQLPort
   Name: Gonçalo Chaves
   Alias: Chaves
   Job: Senior Analyst
   Company: Viatecla
   Im: evolution69@msn.com
   Tw: @gchaves
   Hobbies: reading, photo, gaming
   Email: gchaves@viatecla.com
   Communities: xamlpt, pontonetpt, sqlport
“The biggest problem in databases is
         the base data…”
   Main challenges
   Why we don’t care
   Analysis and procedures
   Tools
   Use Cases
   References
   Engineers knows programing but they don’t
    know SQL!
   Rookies don’t thing in scalability!
   High availability
   Scale and Scale
   Trustful transactions
   Performance and tuning
   Maintenance and archiving
   Partitioning
   Data integrity
   The easy path
   Comfort, learning is a painful process
   No professional training
   No time!
   The big truck rule
   Scale and trust aren’t known
   “Microsoft’s lema”
   Don’t know the engine
   Wrong Assumptions
   Re-use views, queries, with no limits
   Data type? What? nvarchar don’t fit in all?
   Unknown Transaction Isolation levels
   Tons of locks on a single query
   Normalization
     Careful to much can be inefficient
   Appropriate Keys and Indexes
   Right Primary and FK’s
     Choose for relations and integrity
   Don’t over on Indexes
     Take’s disk space
     Drop index for bulk insertion
     Some WHERE’s clauses can’t take advantage on ix
     Evaluate and test you ix
   Each Database is a Database
     BETWEEN can be more efficient than operators
     Native functions (Convert, format…)
     Aggregate functions (max, min, count, …)
   The NULL cancer… you must know NULL well
     ISNull can be a painful
     Wrong assumption on fields
     Null datatype vs “Null”
     Non safe transaction
     Logic looseness
   My debug:
     Profiler… yeah it’s heavy but it’s useful!
     TA – tuning advisor
     Activity monitor
     Look for index, keys, fragments,
   Daily, every sql dev is also an sql admin!
     RedGate suite
     QueryExpress (light, keep simple)
     TableDiff.exe
     DMVStats (dataware house)
     SQL Server Cache manager
   DBA? Where?
     SQL Internals Viewer
     SQLQueryStress (in dev or stage scenarios)
     SQLIO Disk Benchmark tool (on server)
   SQL Security
     Roles may be insufficient
     Prevent SQL injection
     Prevent non logic queries that can burn your data
     Remember, it’s more easier broke sql security by
     your app than anything else.
   The devil ….


    SELECT *
   Dam accelerators ….
     ADO.NET
     SQLDATASOURCE
     LINQ to SQL
     Entity Framework …
   Abuses on
     Group by ; Having; Inner join
     Sub queries with sub queries with …
     #temp_table for everything…
     DML cmd’s
     Constraints for everything…
   Good sense
     Know your data           5
   Maintenance                4
     Job your data            3                                Frag
   Integrity vs Performance   2                                Perf
                                                                Disk
                               1
     The balance is the key
                               0
                                   Jan Fev Mar April May June
   Database – xpto
     1500 tables
     2700 stored procedures
     ~1.5 M transaction per day
   Delete in cascade …
     Broke process
     Restart server
   Normalize has needed
   Test your database
   Schedule jobs
   Create Index’s where needed
   Use right tools
     full text search, TA, SSIS
   Avoid triggers
   Partitioning
   Archive data
   Data type right usage
   Think in your transaction mode
   Use safe locks
   Test, application stress and faulty
   Document you DB 
   Keep scripts in safe
   Update your scripts
   Use facts not assumptions
   Cross your test with others
   Right lock safe usage
   Define db architecture
   A good DB start’s on your apps
   Cache is more than welcome
   “The 4 connections challenge..”
   Multiple Environments keep DB’s updated
   Keep your analysis update
 Developers exists in C# not in SQL – Deal with it!
 Train your team – code review; sessions; books
 Use the right tools on right scenarios
 Integrity vs Performance
 Keep in mind security concerns
 Make Maintenance plans – from the beginning
 Usual blog’s / Communities
 SQL 2008 internals
 Write Smart Sql
 SQL For Smarties
 Sql forums … sqlport 
 Thank you all 
 Do right SQL before the pain!
 Follow me at:
  http://pontonetpt.org/blogs/chaves
  http://xamlpt.com/blogs/chaves
 gchaves@viatecla.com
 www.viatecla.com

More Related Content

Similar to Backpack Tools4 Sql Dev

Domain oriented development
Domain oriented developmentDomain oriented development
Domain oriented developmentrajmundr
 
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 DataCloudera, Inc.
 
Deployment Preparedness
Deployment Preparedness Deployment Preparedness
Deployment Preparedness MongoDB
 
Databases benoitg 2009-03-10
Databases benoitg 2009-03-10Databases benoitg 2009-03-10
Databases benoitg 2009-03-10benoitg
 
Elegant and Efficient Database Design
Elegant and Efficient Database DesignElegant and Efficient Database Design
Elegant and Efficient Database DesignBecky Sweger
 
Beat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkBeat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkPedro González Serrano
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleSteve Karam
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemAbishek V S
 
Clustered PHP - DC PHP 2009
Clustered PHP - DC PHP 2009Clustered PHP - DC PHP 2009
Clustered PHP - DC PHP 2009marcelesser
 
Essential Data Engineering for Data Scientist
Essential Data Engineering for Data Scientist Essential Data Engineering for Data Scientist
Essential Data Engineering for Data Scientist SoftServe
 
MySQL HA Alternatives 2010
MySQL  HA  Alternatives 2010MySQL  HA  Alternatives 2010
MySQL HA Alternatives 2010Kris Buytaert
 
SQLBits VI - Improving database performance by removing the database
SQLBits VI - Improving database performance by removing the databaseSQLBits VI - Improving database performance by removing the database
SQLBits VI - Improving database performance by removing the databaseSimon Munro
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]Huy Do
 
Evolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistEvolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistTony Rogerson
 
Building scalable application with sql server
Building scalable application with sql serverBuilding scalable application with sql server
Building scalable application with sql serverChris Adkin
 
Python for Data Logistics
Python for Data LogisticsPython for Data Logistics
Python for Data LogisticsKen Farmer
 
Database revolution opening webcast 01 18-12
Database revolution opening webcast 01 18-12Database revolution opening webcast 01 18-12
Database revolution opening webcast 01 18-12mark madsen
 
Database Revolution - Exploratory Webcast
Database Revolution - Exploratory WebcastDatabase Revolution - Exploratory Webcast
Database Revolution - Exploratory WebcastInside Analysis
 
Application architecture for the rest of us - php xperts devcon 2012
Application architecture for the rest of us -  php xperts devcon 2012Application architecture for the rest of us -  php xperts devcon 2012
Application architecture for the rest of us - php xperts devcon 2012M N Islam Shihan
 

Similar to Backpack Tools4 Sql Dev (20)

Domain oriented development
Domain oriented developmentDomain oriented development
Domain oriented development
 
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
 
Deployment Preparedness
Deployment Preparedness Deployment Preparedness
Deployment Preparedness
 
Databases benoitg 2009-03-10
Databases benoitg 2009-03-10Databases benoitg 2009-03-10
Databases benoitg 2009-03-10
 
Elegant and Efficient Database Design
Elegant and Efficient Database DesignElegant and Efficient Database Design
Elegant and Efficient Database Design
 
Beat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmarkBeat the devil: towards a Drupal performance benchmark
Beat the devil: towards a Drupal performance benchmark
 
Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in Oracle
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Clustered PHP - DC PHP 2009
Clustered PHP - DC PHP 2009Clustered PHP - DC PHP 2009
Clustered PHP - DC PHP 2009
 
Essential Data Engineering for Data Scientist
Essential Data Engineering for Data Scientist Essential Data Engineering for Data Scientist
Essential Data Engineering for Data Scientist
 
NoSQL
NoSQLNoSQL
NoSQL
 
MySQL HA Alternatives 2010
MySQL  HA  Alternatives 2010MySQL  HA  Alternatives 2010
MySQL HA Alternatives 2010
 
SQLBits VI - Improving database performance by removing the database
SQLBits VI - Improving database performance by removing the databaseSQLBits VI - Improving database performance by removing the database
SQLBits VI - Improving database performance by removing the database
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]
 
Evolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistEvolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/Specialist
 
Building scalable application with sql server
Building scalable application with sql serverBuilding scalable application with sql server
Building scalable application with sql server
 
Python for Data Logistics
Python for Data LogisticsPython for Data Logistics
Python for Data Logistics
 
Database revolution opening webcast 01 18-12
Database revolution opening webcast 01 18-12Database revolution opening webcast 01 18-12
Database revolution opening webcast 01 18-12
 
Database Revolution - Exploratory Webcast
Database Revolution - Exploratory WebcastDatabase Revolution - Exploratory Webcast
Database Revolution - Exploratory Webcast
 
Application architecture for the rest of us - php xperts devcon 2012
Application architecture for the rest of us -  php xperts devcon 2012Application architecture for the rest of us -  php xperts devcon 2012
Application architecture for the rest of us - php xperts devcon 2012
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Backpack Tools4 Sql Dev

  • 1. XII Encontro da comunidade SQLPort
  • 2. Name: Gonçalo Chaves  Alias: Chaves  Job: Senior Analyst  Company: Viatecla  Im: evolution69@msn.com  Tw: @gchaves  Hobbies: reading, photo, gaming  Email: gchaves@viatecla.com  Communities: xamlpt, pontonetpt, sqlport
  • 3. “The biggest problem in databases is the base data…”
  • 4. Main challenges  Why we don’t care  Analysis and procedures  Tools  Use Cases  References
  • 5. Engineers knows programing but they don’t know SQL!
  • 6. Rookies don’t thing in scalability!
  • 7. High availability  Scale and Scale  Trustful transactions  Performance and tuning  Maintenance and archiving  Partitioning  Data integrity
  • 8. The easy path  Comfort, learning is a painful process  No professional training  No time!  The big truck rule  Scale and trust aren’t known  “Microsoft’s lema”
  • 9. Don’t know the engine  Wrong Assumptions  Re-use views, queries, with no limits  Data type? What? nvarchar don’t fit in all?  Unknown Transaction Isolation levels  Tons of locks on a single query
  • 10. Normalization  Careful to much can be inefficient  Appropriate Keys and Indexes  Right Primary and FK’s  Choose for relations and integrity
  • 11. Don’t over on Indexes  Take’s disk space  Drop index for bulk insertion  Some WHERE’s clauses can’t take advantage on ix  Evaluate and test you ix
  • 12. Each Database is a Database  BETWEEN can be more efficient than operators  Native functions (Convert, format…)  Aggregate functions (max, min, count, …)
  • 13. The NULL cancer… you must know NULL well  ISNull can be a painful  Wrong assumption on fields  Null datatype vs “Null”  Non safe transaction  Logic looseness
  • 14. My debug:  Profiler… yeah it’s heavy but it’s useful!  TA – tuning advisor  Activity monitor  Look for index, keys, fragments,
  • 15. Daily, every sql dev is also an sql admin!  RedGate suite  QueryExpress (light, keep simple)  TableDiff.exe  DMVStats (dataware house)  SQL Server Cache manager
  • 16. DBA? Where?  SQL Internals Viewer  SQLQueryStress (in dev or stage scenarios)  SQLIO Disk Benchmark tool (on server)
  • 17. SQL Security  Roles may be insufficient  Prevent SQL injection  Prevent non logic queries that can burn your data  Remember, it’s more easier broke sql security by your app than anything else.
  • 18. The devil …. SELECT *
  • 19. Dam accelerators ….  ADO.NET  SQLDATASOURCE  LINQ to SQL  Entity Framework …
  • 20. Abuses on  Group by ; Having; Inner join  Sub queries with sub queries with …  #temp_table for everything…  DML cmd’s  Constraints for everything…
  • 21. Good sense  Know your data 5  Maintenance 4  Job your data 3 Frag  Integrity vs Performance 2 Perf Disk 1  The balance is the key 0 Jan Fev Mar April May June
  • 22. Database – xpto  1500 tables  2700 stored procedures  ~1.5 M transaction per day  Delete in cascade …  Broke process  Restart server
  • 23. Normalize has needed  Test your database  Schedule jobs  Create Index’s where needed  Use right tools  full text search, TA, SSIS
  • 24. Avoid triggers  Partitioning  Archive data  Data type right usage  Think in your transaction mode  Use safe locks  Test, application stress and faulty
  • 25. Document you DB   Keep scripts in safe  Update your scripts  Use facts not assumptions  Cross your test with others  Right lock safe usage  Define db architecture
  • 26. A good DB start’s on your apps  Cache is more than welcome  “The 4 connections challenge..”  Multiple Environments keep DB’s updated  Keep your analysis update
  • 27.  Developers exists in C# not in SQL – Deal with it!  Train your team – code review; sessions; books  Use the right tools on right scenarios  Integrity vs Performance  Keep in mind security concerns  Make Maintenance plans – from the beginning
  • 28.  Usual blog’s / Communities  SQL 2008 internals  Write Smart Sql  SQL For Smarties  Sql forums … sqlport 
  • 29.  Thank you all   Do right SQL before the pain!  Follow me at: http://pontonetpt.org/blogs/chaves http://xamlpt.com/blogs/chaves  gchaves@viatecla.com  www.viatecla.com