SlideShare a Scribd company logo
MY DATABASE SKILLS
KILLED THE SERVER
Dave Ferguson
@dfgrumpy
CFSummit 2015
WHO AM I?
I am an Adobe Community Professional
I started building web applications a long time ago
Contributor to Learn CF in a week
I have a ColdFusion podcast called
CFHour w/ Scott Stroz (@boyzoid)
(please listen)
3x District Champion in Taekwondo
WHAT WILL WE COVER?
• Running Queries
• When good SQL goes bad
• Bulk processing
• Large volume datasets
• Indexes
• Outside influences
(I KNOW SQL)
“WHY AM I HERE?”
Because you have probably written something like
this…
select * from myTable
“I can write SQL in my sleep”
select * from myTable where id = 2
“I can write joins and
other complex SQL”
Select mt.* from myTable mt
join myOtherTable mot
on mt.id = mot.id
where mot.id = 2
“I might even create a table”
CREATE TABLE `myFakeTable` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`someName` varchar(150) NOT NULL DEFAULT '',
`someDescription` text,
`type` varchar(50) DEFAULT NULL,
`status` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
But, how do you know if what
you did was the best / most
efficient way to do it?
Did the
internet tell
you it was
right?
Did you get
some advice
from a
someone?
“My app works fine. It has
thousands of queries and we
only see slowness every once in
a while. ”
Have you ever truly looked at
what your queries are doing?
Most developers don't bother.
They leave all that technical
database stuff up to the DBA.
But what if you are the
developer AND the DBA?
Query Plan
Uses Execution Contexts
Created for each degree of parallelism for
a query
Execution Context
Specific to the query being executed.
Created for each query
QUERY EXECUTION
Execution Context & Query Plan
Have you ever looked
at a query plan?
Do you know what a query plan is?
Query Plan, In the event you were curious…
WHAT A QUERY PLAN WILL TELL YOU
• Path taken to get data
• Almost like a Java stack trace
• Indexes usage
• How the indexes are being used
• Cost of each section of plan
• Possible suggestions for performance improvement
• Whole bunch of other stuff
How long are plans / contexts kept?
 1 Hour
 1 Day
 ‘Til SQL server restarts
 Discards it immediately
 The day after forever
 Till the server runs out of cache space
What can cause plans to be flushed from cache?
 Forced via code
 Memory pressure
 Alter statements
 Statistics update
 auto_update statistics on
HOW CAN WE KEEP THE
DATABASE FROM THROWING
AWAY THE PLANS?
MORE IMPORTANTLY,
HOW CAN WE GET THE DATABASE
TO USE THE CACHED PLANS?
• Force it
• Use params
• Use stored procedures
• Get more ram
• Use less queries
SIMPLE ANSWER
HOW DOES SQL
DETERMINE IF THERE
IS A QUERY PLAN?
Something
Like this…
THIS QUERY WILL
CREATE A EXECUTION CONTEXT..
select id, name from myTable where id = 2
THAT…
WILL NOT BE USED BY
THIS QUERY.
select id, name from myTable where id = 5
WHY IS THAT?
Well, the queries are
not the same.
According to the SQL optimizer,
select id, name from myTable where id = 2
select id, name from myTable where id = 5
this query…
and this query…
are not the same.
So, they each get their own execution context.
PLANS CAN BECOME DATA HOGS
select id, name from myTable where id = 2
If the query above ran 5,000 times over the
course of an hour (with different ids), you could
have that many plans cached.
That could equal around 120mb of cache space!
TO RECAP…
EXECUTION CONTEXTS
ARE GOOD
TOO MANY ARE BAD
USING QUERY PARAMS…
The secret sauce to plan reuse
<cfquery name="testQuery">
select a.ARTID, a.ARTNAME from ART a
where a.ARTID = <cfqueryparam value="5”
cfsqltype="cf_sql_integer">
</cfquery>
Using a simple query… let’s add a param for the id.
select a.ARTID, a.ARTNAME from ART a
where a.ARTID = ?
THE QUERY OPTIMIZER SEES THIS…
testQuery (Datasource=cfartgallery, Time=1ms, Records=1)
in /xxx/x.cfm
select a.ARTID, a.ARTNAME from ART a
where a.ARTID = ?
Query Parameter Value(s) -
Parameter #1(cf_sql_integer) = 5
THE DEBUG OUTPUT LOOKS LIKE THIS…
testQuery (Datasource=cfartgallery, Time=8ms, Records=5) in /xxx/x.cfm
select a.ARTID, a.ARTNAME from ART a
where a.ARTID in (?,?,?,?,?)
Query Parameter Value(s) -
Parameter #1(CF_SQL_CHAR) = 1
Parameter #2(CF_SQL_CHAR) = 2
Parameter #3(CF_SQL_CHAR) = 3
Parameter #4(CF_SQL_CHAR) = 4
Parameter #5(CF_SQL_CHAR) = 5
IT EVEN WORKS ON LISTS…
testQuery (Datasource=cfartgallery, Time=3ms, Records=1) in /xxx/x.cfm
select a.ARTID, a.ARTNAME, (
select count(*) from ORDERITEMS oi where oi.ARTID = ?
) as ordercount
from ART a
where a.ARTID in (?)
Query Parameter Value(s) -
Parameter #1(cf_sql_integer) = 5
Parameter #2(cf_sql_integer) = 5
MORE ACCURATELY, THEY WORK ANYWHERE
YOU WOULD HAVE DYNAMIC INPUT...
When can plans cause more harm
then help?
► When your data structure changes
► When data volume grows quickly
► When you have data with a high
degree of cardinality.
How do I deal
with all this data?
What do I mean by large data sets?
► Tables over 1 million rows
► Large databases
► Heavily denormalized data
Ways to manage large data
► Only return what you need (no “select *”)
► Try and page the data in some fashion
► Optimize indexes to speed up where
clauses
► Avoid using triggers on large volume
inserts / multi-row updates
► Reduce any post query processing as
much as possible
Inserting / Updating large datasets
► Reduce calls to database by combining queries
► Use bulk loading features of your Database
► Use XML/JSON to load data into Database
Combining Queries: Instead of doing this…
Do this…
Gotcha’s in query combining
► Errors could cause whole batch to fail
► Overflowing allowed query string size
► Database locking can be problematic
► Difficult to get any usable result from query
Upside query combining
► Reduces network calls to database
► Processed as a single batch in database
► Generally processed many times faster
than doing the insert one at a time
I have used this technique to insert over 50k rows
into mysql in under one second.
Indexes
The secret art
of a faster select
Index Types
► Unique
► Primary key or row ID
► Covering
► A collection of columns indexed in an order that
matches where clauses
► Clustered
► The way the data is physically stored
► Table can only have one
► NonClustered
► Only contain indexed data with a pointer back to
source data
Seeking and Scanning
► Index SCAN (table scan)
► Touches all rows
► Useful only if the table contains small amount of rows
► Index SEEK
► Only touches rows that qualify
► Useful for large datasets or highly selective queries
► Even with an index, the optimizer may still opt to perform a scan
To index or not to index…
► DO INDEX
► Large datasets where 10 – 15% of the data is usually
returned
► Columns used in where clauses with high cardinality
► User name column where values are unique
► DON’T INDEX
► Small tables
► Columns with low cardinality
► Any column with only a couple unique values
Do I really need an index?
It Depends.
Really… it Depends!
Outside influences
Other things that can effect performance
► Processor load
► Memory pressure
► Hard drive I/O
► Network
Processor
► Give SQL Server process CPU priority
► Watch for other processes on the server using
excessive CPU cycles
► Have enough cores to handle your database
activity
► Try to keep average processor load below
50% so the system can handle spikes
gracefully
Memory (RAM)
► Get a ton (RAM is cheap)
► Make sure you have enough RAM to keep your server
from doing excess paging
► Make sure your DB is using the RAM in the server
► Allow the DB to use RAM for cache
► Watch for other processes using excessive RAM
Drive I/O
► Drive I/O is usually the largest bottle neck on the server
► Drives can only perform one operation at a time
► Make sure you don’t run out of space
► Purge log files
► Don’t store all DB and log files on the same physical drives
► On windows don’t put your DB on the C: drive
► If possible, use SSD drives for tempdb or other highly
transactional DBs
► Log drives should be in write priority mode
► Data drives should be in read priority mode
Network
► Only matters if App server and DB server are on separate machines
(they should be)
► Minimize network hops between servers
► Watch for network traffic spikes that slow data retrieval
► Only retrieving data needed will speed up retrieval from DB server to
app server
► Split network traffic on SQL server across multiple NIC cards so that
general network traffic doesn’t impact DB traffic
Some Important
Database Statistics
Important stats
► Recompiles
► Recompile of a proc while running shouldn’t occur
► Caused by code in proc or memory issues
► Latch Waits
► Low level lock inside DB; Should be sub 10ms
► Lock Waits
► Data lock wait caused by thread waiting for
another lock to clear
► Full Scans
► Select queries not using indexes
Important stats continued..
► Cache Hit Ratio
► How often DB is hitting memory cache vs Disk
► Disk Read / Write times
► Access time or write times to drives
► SQL Processor time
► SQL server processor load
► SQL Memory
► Amount of system memory being used by SQL
Where SQL goes wrong
(Good examples of bad SQL)
Inline queries that
shouldn’t be
Over joining data
Transactions – Do you see the issue?
THANK YOU
Dave Ferguson
@dfgrumpy
dave@dkferguson.com
www.cfhour.com
CFSummit 2015
Don’t forget to fill out the survey

More Related Content

What's hot

Realtime with-websockets-2015
Realtime with-websockets-2015Realtime with-websockets-2015
Realtime with-websockets-2015
ColdFusionConference
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
Gavin Pickin
 
Realtime with websockets
Realtime with websocketsRealtime with websockets
Realtime with websockets
ColdFusionConference
 
10 common cf server challenges
10 common cf server challenges10 common cf server challenges
10 common cf server challenges
ColdFusionConference
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
ColdFusionConference
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
ColdFusionConference
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 
A crash course in scaling wordpress
A crash course inscaling wordpress A crash course inscaling wordpress
A crash course in scaling wordpress
GovLoop
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
Virtual JBoss User Group
 
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
Amazon Web Services
 
Scaling and Managing Selenium Grid
Scaling and Managing Selenium GridScaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
dimakovalenko
 
Modern PHP Ch7 Provisioning Guide 導讀
Modern PHP Ch7 Provisioning Guide 導讀Modern PHP Ch7 Provisioning Guide 導讀
Modern PHP Ch7 Provisioning Guide 導讀
Chen Cheng-Wei
 
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Alexander Lisachenko
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gavin Pickin
 
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) HackableCollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
Darren Duke
 
Automate Thyself
Automate ThyselfAutomate Thyself
Automate Thyself
Ortus Solutions, Corp
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
Virtual JBoss User Group
 
Running and Scaling Magento on AWS
Running and Scaling Magento on AWSRunning and Scaling Magento on AWS
Running and Scaling Magento on AWS
AOE
 

What's hot (19)

Realtime with-websockets-2015
Realtime with-websockets-2015Realtime with-websockets-2015
Realtime with-websockets-2015
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
 
Realtime with websockets
Realtime with websocketsRealtime with websockets
Realtime with websockets
 
10 common cf server challenges
10 common cf server challenges10 common cf server challenges
10 common cf server challenges
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
 
Cfml features modern_coding
Cfml features modern_codingCfml features modern_coding
Cfml features modern_coding
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
A crash course in scaling wordpress
A crash course inscaling wordpress A crash course inscaling wordpress
A crash course in scaling wordpress
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
 
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
 
Scaling and Managing Selenium Grid
Scaling and Managing Selenium GridScaling and Managing Selenium Grid
Scaling and Managing Selenium Grid
 
Modern PHP Ch7 Provisioning Guide 導讀
Modern PHP Ch7 Provisioning Guide 導讀Modern PHP Ch7 Provisioning Guide 導讀
Modern PHP Ch7 Provisioning Guide 導讀
 
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
 
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
 
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) HackableCollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
CollabSphere SC 103 : Domino on the Web : Yes, It's (Probably) Hackable
 
Automate Thyself
Automate ThyselfAutomate Thyself
Automate Thyself
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
Running and Scaling Magento on AWS
Running and Scaling Magento on AWSRunning and Scaling Magento on AWS
Running and Scaling Magento on AWS
 

Viewers also liked

An optical satellite tracking system for undergraduate research bruski, jon...
An optical satellite tracking system for undergraduate research   bruski, jon...An optical satellite tracking system for undergraduate research   bruski, jon...
An optical satellite tracking system for undergraduate research bruski, jon...
Srinivas Naidu
 
Guidi Sherer Everything You Wanted to Know About 340B Oncology Issues 2011
Guidi Sherer Everything You Wanted to Know About 340B Oncology Issues 2011Guidi Sherer Everything You Wanted to Know About 340B Oncology Issues 2011
Guidi Sherer Everything You Wanted to Know About 340B Oncology Issues 2011Matt Sherer
 
Joensuu 13.10.2016: Tuuli Ollilan esitys Joensuun Nuoret oikeille raiteille ...
Joensuu 13.10.2016: Tuuli Ollilan esitys Joensuun Nuoret oikeille raiteille  ...Joensuu 13.10.2016: Tuuli Ollilan esitys Joensuun Nuoret oikeille raiteille  ...
Joensuu 13.10.2016: Tuuli Ollilan esitys Joensuun Nuoret oikeille raiteille ...
Aspa Foundation
 
Medical Device Tax Piece
Medical Device Tax PieceMedical Device Tax Piece
Medical Device Tax PieceJeremy Kraut
 
Mobile Applications Made Easy with ColdFusion 11
Mobile Applications Made Easy with ColdFusion 11Mobile Applications Made Easy with ColdFusion 11
Mobile Applications Made Easy with ColdFusion 11
ColdFusionConference
 
Delivering Responsibly
Delivering ResponsiblyDelivering Responsibly
Delivering Responsibly
ColdFusionConference
 
DNA_replication_peace
DNA_replication_peaceDNA_replication_peace
DNA_replication_peacepunxsyscience
 
ColdFusion builder plugins
ColdFusion builder pluginsColdFusion builder plugins
ColdFusion builder plugins
ColdFusionConference
 
Tulevaisuus on mobiilissa! Miten muuttuu intranetien konsepti?
Tulevaisuus on mobiilissa! Miten muuttuu intranetien konsepti?Tulevaisuus on mobiilissa! Miten muuttuu intranetien konsepti?
Tulevaisuus on mobiilissa! Miten muuttuu intranetien konsepti?
Hanna P. Korhonen
 
Building Linux IPv6 DNS Server (Complete Soft Copy)
Building Linux IPv6 DNS Server (Complete Soft Copy)Building Linux IPv6 DNS Server (Complete Soft Copy)
Building Linux IPv6 DNS Server (Complete Soft Copy)
Hari
 
Intranet palvelut Suomessa 2016 - Esitys 28.9.2016 Digitaalinen työympäristö ...
Intranet palvelut Suomessa 2016 - Esitys 28.9.2016 Digitaalinen työympäristö ...Intranet palvelut Suomessa 2016 - Esitys 28.9.2016 Digitaalinen työympäristö ...
Intranet palvelut Suomessa 2016 - Esitys 28.9.2016 Digitaalinen työympäristö ...
Hanna P. Korhonen
 
Introduction to Android G Sensor I²C Driver on Android
Introduction to Android G Sensor I²C Driver on AndroidIntroduction to Android G Sensor I²C Driver on Android
Introduction to Android G Sensor I²C Driver on Android
Bo-Yi Wu
 
Intranet palvelut Suomessa 2016 - Kaikki tulokset
Intranet palvelut Suomessa 2016 - Kaikki tuloksetIntranet palvelut Suomessa 2016 - Kaikki tulokset
Intranet palvelut Suomessa 2016 - Kaikki tulokset
Hanna P. Korhonen
 
Régimen disciplinario para profesores del Sector Público RVM N° 091 2015-MINE...
Régimen disciplinario para profesores del Sector Público RVM N° 091 2015-MINE...Régimen disciplinario para profesores del Sector Público RVM N° 091 2015-MINE...
Régimen disciplinario para profesores del Sector Público RVM N° 091 2015-MINE...
Teresa Clotilde Ojeda Sánchez
 
La importancia de reciclar
La importancia de reciclarLa importancia de reciclar
La importancia de reciclarLuis Martín
 

Viewers also liked (16)

An optical satellite tracking system for undergraduate research bruski, jon...
An optical satellite tracking system for undergraduate research   bruski, jon...An optical satellite tracking system for undergraduate research   bruski, jon...
An optical satellite tracking system for undergraduate research bruski, jon...
 
Guidi Sherer Everything You Wanted to Know About 340B Oncology Issues 2011
Guidi Sherer Everything You Wanted to Know About 340B Oncology Issues 2011Guidi Sherer Everything You Wanted to Know About 340B Oncology Issues 2011
Guidi Sherer Everything You Wanted to Know About 340B Oncology Issues 2011
 
Joensuu 13.10.2016: Tuuli Ollilan esitys Joensuun Nuoret oikeille raiteille ...
Joensuu 13.10.2016: Tuuli Ollilan esitys Joensuun Nuoret oikeille raiteille  ...Joensuu 13.10.2016: Tuuli Ollilan esitys Joensuun Nuoret oikeille raiteille  ...
Joensuu 13.10.2016: Tuuli Ollilan esitys Joensuun Nuoret oikeille raiteille ...
 
Medical Device Tax Piece
Medical Device Tax PieceMedical Device Tax Piece
Medical Device Tax Piece
 
Mobile Applications Made Easy with ColdFusion 11
Mobile Applications Made Easy with ColdFusion 11Mobile Applications Made Easy with ColdFusion 11
Mobile Applications Made Easy with ColdFusion 11
 
Bio animation
Bio animationBio animation
Bio animation
 
Delivering Responsibly
Delivering ResponsiblyDelivering Responsibly
Delivering Responsibly
 
DNA_replication_peace
DNA_replication_peaceDNA_replication_peace
DNA_replication_peace
 
ColdFusion builder plugins
ColdFusion builder pluginsColdFusion builder plugins
ColdFusion builder plugins
 
Tulevaisuus on mobiilissa! Miten muuttuu intranetien konsepti?
Tulevaisuus on mobiilissa! Miten muuttuu intranetien konsepti?Tulevaisuus on mobiilissa! Miten muuttuu intranetien konsepti?
Tulevaisuus on mobiilissa! Miten muuttuu intranetien konsepti?
 
Building Linux IPv6 DNS Server (Complete Soft Copy)
Building Linux IPv6 DNS Server (Complete Soft Copy)Building Linux IPv6 DNS Server (Complete Soft Copy)
Building Linux IPv6 DNS Server (Complete Soft Copy)
 
Intranet palvelut Suomessa 2016 - Esitys 28.9.2016 Digitaalinen työympäristö ...
Intranet palvelut Suomessa 2016 - Esitys 28.9.2016 Digitaalinen työympäristö ...Intranet palvelut Suomessa 2016 - Esitys 28.9.2016 Digitaalinen työympäristö ...
Intranet palvelut Suomessa 2016 - Esitys 28.9.2016 Digitaalinen työympäristö ...
 
Introduction to Android G Sensor I²C Driver on Android
Introduction to Android G Sensor I²C Driver on AndroidIntroduction to Android G Sensor I²C Driver on Android
Introduction to Android G Sensor I²C Driver on Android
 
Intranet palvelut Suomessa 2016 - Kaikki tulokset
Intranet palvelut Suomessa 2016 - Kaikki tuloksetIntranet palvelut Suomessa 2016 - Kaikki tulokset
Intranet palvelut Suomessa 2016 - Kaikki tulokset
 
Régimen disciplinario para profesores del Sector Público RVM N° 091 2015-MINE...
Régimen disciplinario para profesores del Sector Público RVM N° 091 2015-MINE...Régimen disciplinario para profesores del Sector Público RVM N° 091 2015-MINE...
Régimen disciplinario para profesores del Sector Público RVM N° 091 2015-MINE...
 
La importancia de reciclar
La importancia de reciclarLa importancia de reciclar
La importancia de reciclar
 

Similar to My Database Skills Killed the Server

My SQL Skills Killed the Server
My SQL Skills Killed the ServerMy SQL Skills Killed the Server
My SQL Skills Killed the Server
devObjective
 
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
Migration to ClickHouse. Practical guide, by Alexander ZaitsevMigration to ClickHouse. Practical guide, by Alexander Zaitsev
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
Altinity Ltd
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
javier ramirez
 
Best Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and DeltaBest Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and Delta
Databricks
 
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibabahbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
Michael Stack
 
Secrets of highly_avail_oltp_archs
Secrets of highly_avail_oltp_archsSecrets of highly_avail_oltp_archs
Secrets of highly_avail_oltp_archsTarik Essawi
 
Mysql For Developers
Mysql For DevelopersMysql For Developers
Mysql For Developers
Carol McDonald
 
Amazon Redshift Masterclass
Amazon Redshift MasterclassAmazon Redshift Masterclass
Amazon Redshift Masterclass
Amazon Web Services
 
Using cassandra as a distributed logging to store pb data
Using cassandra as a distributed logging to store pb dataUsing cassandra as a distributed logging to store pb data
Using cassandra as a distributed logging to store pb data
Ramesh Veeramani
 
Performance Tuning
Performance TuningPerformance Tuning
Performance Tuning
Ligaya Turmelle
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
IDERA Software
 
Masterclass - Redshift
Masterclass - RedshiftMasterclass - Redshift
Masterclass - Redshift
Amazon Web Services
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
ColdFusionConference
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1sqlserver.co.il
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should Know
Dean Richards
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersJonathan Levin
 
Cassandra training
Cassandra trainingCassandra training
Cassandra training
András Fehér
 
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
AiougVizagChapter
 

Similar to My Database Skills Killed the Server (20)

My SQL Skills Killed the Server
My SQL Skills Killed the ServerMy SQL Skills Killed the Server
My SQL Skills Killed the Server
 
Sql killedserver
Sql killedserverSql killedserver
Sql killedserver
 
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
Migration to ClickHouse. Practical guide, by Alexander ZaitsevMigration to ClickHouse. Practical guide, by Alexander Zaitsev
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
 
Best Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and DeltaBest Practices for Building Robust Data Platform with Apache Spark and Delta
Best Practices for Building Robust Data Platform with Apache Spark and Delta
 
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibabahbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
 
Secrets of highly_avail_oltp_archs
Secrets of highly_avail_oltp_archsSecrets of highly_avail_oltp_archs
Secrets of highly_avail_oltp_archs
 
Mysql For Developers
Mysql For DevelopersMysql For Developers
Mysql For Developers
 
Amazon Redshift Masterclass
Amazon Redshift MasterclassAmazon Redshift Masterclass
Amazon Redshift Masterclass
 
Using cassandra as a distributed logging to store pb data
Using cassandra as a distributed logging to store pb dataUsing cassandra as a distributed logging to store pb data
Using cassandra as a distributed logging to store pb data
 
Performance Tuning
Performance TuningPerformance Tuning
Performance Tuning
 
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERAGeek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
Geek Sync | How to Be the DBA When You Don't Have a DBA - Eric Cobb | IDERA
 
Masterclass - Redshift
Masterclass - RedshiftMasterclass - Redshift
Masterclass - Redshift
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
 
SQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should KnowSQL Server Wait Types Everyone Should Know
SQL Server Wait Types Everyone Should Know
 
Scaling MySQL Strategies for Developers
Scaling MySQL Strategies for DevelopersScaling MySQL Strategies for Developers
Scaling MySQL Strategies for Developers
 
Cassandra training
Cassandra trainingCassandra training
Cassandra training
 
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 

More from ColdFusionConference

Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
ColdFusionConference
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
ColdFusionConference
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
ColdFusionConference
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
ColdFusionConference
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
ColdFusionConference
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
ColdFusionConference
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
ColdFusionConference
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
ColdFusionConference
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
ColdFusionConference
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusionConference
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
ColdFusionConference
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
ColdFusionConference
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
ColdFusionConference
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
ColdFusionConference
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
ColdFusionConference
 
Securing applications
Securing applicationsSecuring applications
Securing applications
ColdFusionConference
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
ColdFusionConference
 
Rest ful tools for lazy experts
Rest ful tools for lazy expertsRest ful tools for lazy experts
Rest ful tools for lazy experts
ColdFusionConference
 
Herding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandboxHerding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandbox
ColdFusionConference
 

More from ColdFusionConference (20)

Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
Cf ppt vsr
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
 
Securing applications
Securing applicationsSecuring applications
Securing applications
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
 
Rest ful tools for lazy experts
Rest ful tools for lazy expertsRest ful tools for lazy experts
Rest ful tools for lazy experts
 
Herding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandboxHerding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandbox
 

Recently uploaded

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 

My Database Skills Killed the Server

  • 1. MY DATABASE SKILLS KILLED THE SERVER Dave Ferguson @dfgrumpy CFSummit 2015
  • 2. WHO AM I? I am an Adobe Community Professional I started building web applications a long time ago Contributor to Learn CF in a week I have a ColdFusion podcast called CFHour w/ Scott Stroz (@boyzoid) (please listen) 3x District Champion in Taekwondo
  • 3. WHAT WILL WE COVER? • Running Queries • When good SQL goes bad • Bulk processing • Large volume datasets • Indexes • Outside influences
  • 4.
  • 5. (I KNOW SQL) “WHY AM I HERE?”
  • 6. Because you have probably written something like this…
  • 7. select * from myTable
  • 8. “I can write SQL in my sleep” select * from myTable where id = 2
  • 9. “I can write joins and other complex SQL” Select mt.* from myTable mt join myOtherTable mot on mt.id = mot.id where mot.id = 2
  • 10. “I might even create a table” CREATE TABLE `myFakeTable` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `someName` varchar(150) NOT NULL DEFAULT '', `someDescription` text, `type` varchar(50) DEFAULT NULL, `status` int(11) NOT NULL, PRIMARY KEY (`id`) );
  • 11. But, how do you know if what you did was the best / most efficient way to do it?
  • 12. Did the internet tell you it was right?
  • 13. Did you get some advice from a someone?
  • 14. “My app works fine. It has thousands of queries and we only see slowness every once in a while. ”
  • 15. Have you ever truly looked at what your queries are doing?
  • 16. Most developers don't bother. They leave all that technical database stuff up to the DBA. But what if you are the developer AND the DBA?
  • 17. Query Plan Uses Execution Contexts Created for each degree of parallelism for a query Execution Context Specific to the query being executed. Created for each query QUERY EXECUTION
  • 18. Execution Context & Query Plan
  • 19. Have you ever looked at a query plan? Do you know what a query plan is?
  • 20. Query Plan, In the event you were curious…
  • 21. WHAT A QUERY PLAN WILL TELL YOU • Path taken to get data • Almost like a Java stack trace • Indexes usage • How the indexes are being used • Cost of each section of plan • Possible suggestions for performance improvement • Whole bunch of other stuff
  • 22. How long are plans / contexts kept?  1 Hour  1 Day  ‘Til SQL server restarts  Discards it immediately  The day after forever  Till the server runs out of cache space
  • 23. What can cause plans to be flushed from cache?  Forced via code  Memory pressure  Alter statements  Statistics update  auto_update statistics on
  • 24. HOW CAN WE KEEP THE DATABASE FROM THROWING AWAY THE PLANS?
  • 25. MORE IMPORTANTLY, HOW CAN WE GET THE DATABASE TO USE THE CACHED PLANS?
  • 26. • Force it • Use params • Use stored procedures • Get more ram • Use less queries SIMPLE ANSWER
  • 27. HOW DOES SQL DETERMINE IF THERE IS A QUERY PLAN?
  • 29. THIS QUERY WILL CREATE A EXECUTION CONTEXT.. select id, name from myTable where id = 2 THAT…
  • 30. WILL NOT BE USED BY THIS QUERY. select id, name from myTable where id = 5
  • 31. WHY IS THAT? Well, the queries are not the same.
  • 32. According to the SQL optimizer, select id, name from myTable where id = 2 select id, name from myTable where id = 5 this query… and this query… are not the same. So, they each get their own execution context.
  • 33. PLANS CAN BECOME DATA HOGS select id, name from myTable where id = 2 If the query above ran 5,000 times over the course of an hour (with different ids), you could have that many plans cached. That could equal around 120mb of cache space!
  • 34. TO RECAP… EXECUTION CONTEXTS ARE GOOD TOO MANY ARE BAD
  • 35. USING QUERY PARAMS… The secret sauce to plan reuse
  • 36. <cfquery name="testQuery"> select a.ARTID, a.ARTNAME from ART a where a.ARTID = <cfqueryparam value="5” cfsqltype="cf_sql_integer"> </cfquery> Using a simple query… let’s add a param for the id.
  • 37. select a.ARTID, a.ARTNAME from ART a where a.ARTID = ? THE QUERY OPTIMIZER SEES THIS…
  • 38. testQuery (Datasource=cfartgallery, Time=1ms, Records=1) in /xxx/x.cfm select a.ARTID, a.ARTNAME from ART a where a.ARTID = ? Query Parameter Value(s) - Parameter #1(cf_sql_integer) = 5 THE DEBUG OUTPUT LOOKS LIKE THIS…
  • 39. testQuery (Datasource=cfartgallery, Time=8ms, Records=5) in /xxx/x.cfm select a.ARTID, a.ARTNAME from ART a where a.ARTID in (?,?,?,?,?) Query Parameter Value(s) - Parameter #1(CF_SQL_CHAR) = 1 Parameter #2(CF_SQL_CHAR) = 2 Parameter #3(CF_SQL_CHAR) = 3 Parameter #4(CF_SQL_CHAR) = 4 Parameter #5(CF_SQL_CHAR) = 5 IT EVEN WORKS ON LISTS…
  • 40. testQuery (Datasource=cfartgallery, Time=3ms, Records=1) in /xxx/x.cfm select a.ARTID, a.ARTNAME, ( select count(*) from ORDERITEMS oi where oi.ARTID = ? ) as ordercount from ART a where a.ARTID in (?) Query Parameter Value(s) - Parameter #1(cf_sql_integer) = 5 Parameter #2(cf_sql_integer) = 5 MORE ACCURATELY, THEY WORK ANYWHERE YOU WOULD HAVE DYNAMIC INPUT...
  • 41. When can plans cause more harm then help? ► When your data structure changes ► When data volume grows quickly ► When you have data with a high degree of cardinality.
  • 42. How do I deal with all this data?
  • 43. What do I mean by large data sets? ► Tables over 1 million rows ► Large databases ► Heavily denormalized data
  • 44. Ways to manage large data ► Only return what you need (no “select *”) ► Try and page the data in some fashion ► Optimize indexes to speed up where clauses ► Avoid using triggers on large volume inserts / multi-row updates ► Reduce any post query processing as much as possible
  • 45. Inserting / Updating large datasets ► Reduce calls to database by combining queries ► Use bulk loading features of your Database ► Use XML/JSON to load data into Database
  • 46. Combining Queries: Instead of doing this…
  • 48. Gotcha’s in query combining ► Errors could cause whole batch to fail ► Overflowing allowed query string size ► Database locking can be problematic ► Difficult to get any usable result from query
  • 49. Upside query combining ► Reduces network calls to database ► Processed as a single batch in database ► Generally processed many times faster than doing the insert one at a time I have used this technique to insert over 50k rows into mysql in under one second.
  • 50. Indexes The secret art of a faster select
  • 51. Index Types ► Unique ► Primary key or row ID ► Covering ► A collection of columns indexed in an order that matches where clauses ► Clustered ► The way the data is physically stored ► Table can only have one ► NonClustered ► Only contain indexed data with a pointer back to source data
  • 52. Seeking and Scanning ► Index SCAN (table scan) ► Touches all rows ► Useful only if the table contains small amount of rows ► Index SEEK ► Only touches rows that qualify ► Useful for large datasets or highly selective queries ► Even with an index, the optimizer may still opt to perform a scan
  • 53. To index or not to index… ► DO INDEX ► Large datasets where 10 – 15% of the data is usually returned ► Columns used in where clauses with high cardinality ► User name column where values are unique ► DON’T INDEX ► Small tables ► Columns with low cardinality ► Any column with only a couple unique values
  • 54. Do I really need an index?
  • 58. Other things that can effect performance ► Processor load ► Memory pressure ► Hard drive I/O ► Network
  • 59. Processor ► Give SQL Server process CPU priority ► Watch for other processes on the server using excessive CPU cycles ► Have enough cores to handle your database activity ► Try to keep average processor load below 50% so the system can handle spikes gracefully
  • 60. Memory (RAM) ► Get a ton (RAM is cheap) ► Make sure you have enough RAM to keep your server from doing excess paging ► Make sure your DB is using the RAM in the server ► Allow the DB to use RAM for cache ► Watch for other processes using excessive RAM
  • 61. Drive I/O ► Drive I/O is usually the largest bottle neck on the server ► Drives can only perform one operation at a time ► Make sure you don’t run out of space ► Purge log files ► Don’t store all DB and log files on the same physical drives ► On windows don’t put your DB on the C: drive ► If possible, use SSD drives for tempdb or other highly transactional DBs ► Log drives should be in write priority mode ► Data drives should be in read priority mode
  • 62. Network ► Only matters if App server and DB server are on separate machines (they should be) ► Minimize network hops between servers ► Watch for network traffic spikes that slow data retrieval ► Only retrieving data needed will speed up retrieval from DB server to app server ► Split network traffic on SQL server across multiple NIC cards so that general network traffic doesn’t impact DB traffic
  • 64. Important stats ► Recompiles ► Recompile of a proc while running shouldn’t occur ► Caused by code in proc or memory issues ► Latch Waits ► Low level lock inside DB; Should be sub 10ms ► Lock Waits ► Data lock wait caused by thread waiting for another lock to clear ► Full Scans ► Select queries not using indexes
  • 65. Important stats continued.. ► Cache Hit Ratio ► How often DB is hitting memory cache vs Disk ► Disk Read / Write times ► Access time or write times to drives ► SQL Processor time ► SQL server processor load ► SQL Memory ► Amount of system memory being used by SQL
  • 66. Where SQL goes wrong (Good examples of bad SQL)
  • 69. Transactions – Do you see the issue?
  • 70.

Editor's Notes

  1. There is only so much cache room to go around