SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
EEUK2013
MySQL &
ExpressionEngine
Why EEvolution?
We believe that system efficiency is #1 as
its the root to saving time and costs
We provide cost effective solutions that
have a return on investment
We create software to solve problems
Sound Familiar?
- Why is my site is slow?
- How can I get better performance?
- What if I get an increase in visitors?
- Search bots are killing my server!
The database is the data store of your site
... but what can you do to get the best out of it?
DESIGN FOR PERFORMANCE & SCALE
Hardware: Platform
Cost Performance Reliability
Shared Low Low Medium
VPS Low Low / Variable Medium
Cloud Medium Medium Very High
Dynamic Cloud Medium / PAYG Medium Very High
Dedicated High Very High High
Private Cloud Very High High Very High
Hardware: CPU
Cores (40%)
- Single, Dual, Quad, Six, Hex
Clock Speed (30%)
- 2ghz, 3ghz, 4ghz
Vendor (20%)
- AMD vs Intel
CPUs (10%)
- Single vs Dual
Hardware: Memory
25% of Server Memory should cover Database
Indexes (not data in MyISAM)
- key_buffer_size = 25%-35% server memory
- PHPMyAdmin -> Status gives you a easy to
read analysis and config recommendation.
- Check RAM benchmarks when purchasing a
server
Hardware: Disk
IOPS & Random Reads
- SATA (75- 150)
- SAS (140 - 210)
- SSD (9,000 - 10,000,000)
- RAMDisk (30,000 - 50,000, use with caution!)
Hard disks need a good controller which is also
an important factor for performance.
Never mix disk types in a RAID
Operating System
Background Processes
Linux (LAMP, cPanel, Plesk, Webmin)
- CentOS
Windows (WAMP)
- Windows XP
- Windows 7
- Server 2008 + Core Mode
- Server 2012 + Core Mode
Indexes
SELECT = Read
INSERT, UPDATE, DELETE = Read/Write
- Writes will always force an index update.
- Only index columns that you will JOIN ON or
use in WHERE and ORDER BY.
- Schedule an auto DB optimisation.
- EE thottling has a big impact on DB writes
- Index files can be stored on a different disk.
Views, Stored Procedures,
Functions
- VIEWS are used for organisation not for
performance. They can improve speed due to
reduced lock times on large datasets.
- STORED PROCEDURES are used for
organisation not for performance. Don't give up
the dynamically created statement for the 'best
practice' it'll cost you in time.
- FUNCTIONS are used for organisation not for
performance. Stay away, you will only slow
down your queries and waste time.
Optimisation Maintenance
Automatically optimise your database with a
frequently run Cron or Scheduled Task
- Tuning Primer Script
- MySQL Tuning Script
Don't forget to email yourself the results.
Backup
Master / Slave, Replication
- Backup, Distribution
- Read only, Analysis (RAMDisk)
Clustering, RAID
- Resilience, Automatic Failover
Cron / Scheduled Task
- Custom Script, perhaps Amazon S3
WHM
- Scheduled Offsite Backup
So... we're firing on all cylinders!
Remember:
- Get best value hardware for your budget
- Configure for the correct situation
- Use PHPMyAdmin Status & Tuning Script
- Ensure Backup / Replication / Resilience
... Just in case, but always a must!
NOW LETS LOOK AT EE...
EE Settings
- Disable what you don't need
- Page, Template, DB, Tag Cache
- Config: Disable Tracking
Query Cache
EE Dynamic Query Cache:
- If you do not use future entries, expiring
entries and random entries turn this on.
- MySQL also has a cache mechanism which
can improve performance by +200% when
retrieving data from tables that do not change
often. In general it has a 13% overhead. Set
query_cache_size between 10MB and 150MB
(avg size of query results * number of queries)
Schema
EE Schema
- Entry data is wide not deep for scalability.
- Relationships are centralised for simplicity.
- Follow true relationships on your addons for
best performance.
- Index columns based on EE SQL Debug
results. e.g. Searchable custom fields. Don't
assume the schema is 100% efficient out of the
box for EE or third party addons.
Pre-calculated fields
Do on-the-fly calculations in a dedicated field
based on triggered events
- Total number of sales
- Total revenue per member
- Total entry count per member or category
- Run a sanity check/update when idle to
ensure this is accurate regularly.
- Gives you the flexibility to COUNT (accurate,
latency) or SELECT (possibly inaccurate, v.
fast)
EE Entry DB Structure
Get Entries From Table - {exp:query sql=""}
SELECT *, t.*, t.entry_id, COUNT(DISTINCT p.cat_name) AS distinct_count, CASE WHEN IFNULL
(NULLIF(field_id_15,''),'none')='none' THEN field_id_16 ELSE field_id_15 END AS choice
FROM exp_channel_titles t
INNER JOIN exp_channel_data d ON d.entry_id = t.entry_id
INNER JOIN exp_members m ON m.member_id = t.author_id
INNER JOIN exp_member_groups mg ON mg.group_id = m.group_id
INNER JOIN exp_member_data md ON md.member_id = m.member_id
LEFT OUTER JOIN exp_category_posts p ON p.entry_id = t.entry_id
LEFT OUTER JOIN exp_categories c ON c.cat_id = p.cat_id
LEFT OUTER JOIN exp_category_field_data cfd ON cfd.cat_id = c.cat_id
WHERE t.status='open' OR t.entry_id = (0{entry_id}) OR t.entry_id IN (0{preload_replace_vars}) OR t.
entry_id IN (0{snippet_var}) OR p.cat_url_title = '{segment_3}' OR d.field_id_16 LIKE 'test%' OR t.
entry_date > UNIX_TIMESTAMP('2013-05-16 00:00:00') OR d.field_id_16 = d.field_id_17 OR t.
entry_id IN ({snippet_subquery_chosen_categories})
ORDER BY t.entry_date DESC
GROUP BY t.entry_id HAVING COUNT(p.cat_name) > 2
Summary
Remember:
- Use this document as a reference
- Plan your system resources, configure
appropriately and use EE Debug Tools
- Don't be afraid to use {exp:query} to get what
you need.
- Contact us if you need assistance in hardware
or database decisions, optimisation or advice
on your system... we're here to help.
Thank You !
Any Questions?
Tim Mahoney
EEvolution Limited
info@eevolution.co.uk

Weitere ähnliche Inhalte

Was ist angesagt?

Oracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performansOracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performansEmrah METE
 
Oracle performance tuning_sfsf
Oracle performance tuning_sfsfOracle performance tuning_sfsf
Oracle performance tuning_sfsfMao Geng
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014Enkitec
 
SQL Server Optimization Checklist
SQL Server Optimization ChecklistSQL Server Optimization Checklist
SQL Server Optimization ChecklistGrant Fritchey
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning Arno Huetter
 
PostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningPostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningAshnikbiz
 
MySQL Administration and Monitoring
MySQL Administration and MonitoringMySQL Administration and Monitoring
MySQL Administration and MonitoringMark Leith
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1Navneet Upneja
 
Getting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise MonitorGetting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise MonitorMark Leith
 
Improving the Performance of PL/SQL function calls from SQL
Improving the Performance of PL/SQL function calls from SQLImproving the Performance of PL/SQL function calls from SQL
Improving the Performance of PL/SQL function calls from SQLGuatemala User Group
 
Veri Ambarları için Oracle'ın Analitik SQL Desteği
Veri Ambarları için Oracle'ın Analitik SQL DesteğiVeri Ambarları için Oracle'ın Analitik SQL Desteği
Veri Ambarları için Oracle'ın Analitik SQL DesteğiEmrah METE
 
resource governor
resource governorresource governor
resource governorAaron Shilo
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012Eduardo Castro
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuningngupt28
 
Oracle PL/SQL Best Practices
Oracle PL/SQL Best PracticesOracle PL/SQL Best Practices
Oracle PL/SQL Best PracticesEmrah METE
 
PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4Ashnikbiz
 
Tips and Tricks for SAP Sybase IQ
Tips and Tricks for SAP  Sybase IQTips and Tricks for SAP  Sybase IQ
Tips and Tricks for SAP Sybase IQDon Brizendine
 

Was ist angesagt? (20)

Oracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performansOracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performans
 
01 oracle architecture
01 oracle architecture01 oracle architecture
01 oracle architecture
 
Oracle performance tuning_sfsf
Oracle performance tuning_sfsfOracle performance tuning_sfsf
Oracle performance tuning_sfsf
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014
 
SQL Server Optimization Checklist
SQL Server Optimization ChecklistSQL Server Optimization Checklist
SQL Server Optimization Checklist
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning
 
PostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningPostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter Tuning
 
MySQL Administration and Monitoring
MySQL Administration and MonitoringMySQL Administration and Monitoring
MySQL Administration and Monitoring
 
An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1An Approach to Sql tuning - Part 1
An Approach to Sql tuning - Part 1
 
Getting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise MonitorGetting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise Monitor
 
Improving the Performance of PL/SQL function calls from SQL
Improving the Performance of PL/SQL function calls from SQLImproving the Performance of PL/SQL function calls from SQL
Improving the Performance of PL/SQL function calls from SQL
 
Veri Ambarları için Oracle'ın Analitik SQL Desteği
Veri Ambarları için Oracle'ın Analitik SQL DesteğiVeri Ambarları için Oracle'ın Analitik SQL Desteği
Veri Ambarları için Oracle'ın Analitik SQL Desteği
 
resource governor
resource governorresource governor
resource governor
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
 
Oracle PL/SQL Best Practices
Oracle PL/SQL Best PracticesOracle PL/SQL Best Practices
Oracle PL/SQL Best Practices
 
PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4
 
Weblogic plug in
Weblogic plug inWeblogic plug in
Weblogic plug in
 
Tips and Tricks for SAP Sybase IQ
Tips and Tricks for SAP  Sybase IQTips and Tricks for SAP  Sybase IQ
Tips and Tricks for SAP Sybase IQ
 
Performance tuning in sql server
Performance tuning in sql serverPerformance tuning in sql server
Performance tuning in sql server
 

Andere mochten auch

30 години Национален младежки конкурс за поезия "Веселин Ханчев" - Стара Загора
30 години Национален младежки конкурс за поезия "Веселин Ханчев" - Стара Загора30 години Национален младежки конкурс за поезия "Веселин Ханчев" - Стара Загора
30 години Национален младежки конкурс за поезия "Веселин Ханчев" - Стара ЗагораБиблиотека Родина - Стара Загора
 
02 dao dinh kha - idg 2009 (dinh kha) (v2) - last
02   dao dinh kha -  idg 2009 (dinh kha) (v2) - last02   dao dinh kha -  idg 2009 (dinh kha) (v2) - last
02 dao dinh kha - idg 2009 (dinh kha) (v2) - lastDaihocngoaingu English
 
Ankit singh rana plc
Ankit singh rana plc Ankit singh rana plc
Ankit singh rana plc ankits4r3
 
кутузова е.к. фгу_3_курс_два_колеса
кутузова е.к. фгу_3_курс_два_колесакутузова е.к. фгу_3_курс_два_колеса
кутузова е.к. фгу_3_курс_два_колесаEvgeniya Kutuzova
 
Опитът на библиотека Родина в дигитализацията на библиотечни колекции и предс...
Опитът на библиотека Родина в дигитализацията на библиотечни колекции и предс...Опитът на библиотека Родина в дигитализацията на библиотечни колекции и предс...
Опитът на библиотека Родина в дигитализацията на библиотечни колекции и предс...Библиотека Родина - Стара Загора
 
Reading strategies
Reading strategies Reading strategies
Reading strategies Riez Thiena
 
Развитие на Обществен информационен център – опитът на библиотека "Родина"
Развитие на Обществен информационен център – опитът на библиотека "Родина"Развитие на Обществен информационен център – опитът на библиотека "Родина"
Развитие на Обществен информационен център – опитът на библиотека "Родина"Библиотека Родина - Стара Загора
 
Националният литературен конкурс „Моята родина и моето бъдеще” - Стара Загора...
Националният литературен конкурс „Моята родина и моето бъдеще” - Стара Загора...Националният литературен конкурс „Моята родина и моето бъдеще” - Стара Загора...
Националният литературен конкурс „Моята родина и моето бъдеще” - Стара Загора...Библиотека Родина - Стара Загора
 
Top 5 benefits elken spirulina
Top 5 benefits elken spirulinaTop 5 benefits elken spirulina
Top 5 benefits elken spirulinaelkenspirulina
 
NIOS std X Economics Ch 9 Demand
NIOS std X Economics Ch 9 DemandNIOS std X Economics Ch 9 Demand
NIOS std X Economics Ch 9 DemandSajina Nair
 
NIOS X Economics Ch 11, Ch 12 and Ch 13 Determination of Price, Market and ro...
NIOS X Economics Ch 11, Ch 12 and Ch 13 Determination of Price, Market and ro...NIOS X Economics Ch 11, Ch 12 and Ch 13 Determination of Price, Market and ro...
NIOS X Economics Ch 11, Ch 12 and Ch 13 Determination of Price, Market and ro...Sajina Nair
 

Andere mochten auch (16)

Познатите... непознатите
Познатите... непознатитеПознатите... непознатите
Познатите... непознатите
 
30 години Национален младежки конкурс за поезия "Веселин Ханчев" - Стара Загора
30 години Национален младежки конкурс за поезия "Веселин Ханчев" - Стара Загора30 години Национален младежки конкурс за поезия "Веселин Ханчев" - Стара Загора
30 години Национален младежки конкурс за поезия "Веселин Ханчев" - Стара Загора
 
02 dao dinh kha - idg 2009 (dinh kha) (v2) - last
02   dao dinh kha -  idg 2009 (dinh kha) (v2) - last02   dao dinh kha -  idg 2009 (dinh kha) (v2) - last
02 dao dinh kha - idg 2009 (dinh kha) (v2) - last
 
Библиотека Родина 2013
Библиотека Родина 2013Библиотека Родина 2013
Библиотека Родина 2013
 
Teens24
Teens24Teens24
Teens24
 
Краткосмешен Казанлък
Краткосмешен КазанлъкКраткосмешен Казанлък
Краткосмешен Казанлък
 
Ankit singh rana plc
Ankit singh rana plc Ankit singh rana plc
Ankit singh rana plc
 
кутузова е.к. фгу_3_курс_два_колеса
кутузова е.к. фгу_3_курс_два_колесакутузова е.к. фгу_3_курс_два_колеса
кутузова е.к. фгу_3_курс_два_колеса
 
Опитът на библиотека Родина в дигитализацията на библиотечни колекции и предс...
Опитът на библиотека Родина в дигитализацията на библиотечни колекции и предс...Опитът на библиотека Родина в дигитализацията на библиотечни колекции и предс...
Опитът на библиотека Родина в дигитализацията на библиотечни колекции и предс...
 
Reading strategies
Reading strategies Reading strategies
Reading strategies
 
Развитие на Обществен информационен център – опитът на библиотека "Родина"
Развитие на Обществен информационен център – опитът на библиотека "Родина"Развитие на Обществен информационен център – опитът на библиотека "Родина"
Развитие на Обществен информационен център – опитът на библиотека "Родина"
 
Presentation trade vietnamese
Presentation trade vietnamesePresentation trade vietnamese
Presentation trade vietnamese
 
Националният литературен конкурс „Моята родина и моето бъдеще” - Стара Загора...
Националният литературен конкурс „Моята родина и моето бъдеще” - Стара Загора...Националният литературен конкурс „Моята родина и моето бъдеще” - Стара Загора...
Националният литературен конкурс „Моята родина и моето бъдеще” - Стара Загора...
 
Top 5 benefits elken spirulina
Top 5 benefits elken spirulinaTop 5 benefits elken spirulina
Top 5 benefits elken spirulina
 
NIOS std X Economics Ch 9 Demand
NIOS std X Economics Ch 9 DemandNIOS std X Economics Ch 9 Demand
NIOS std X Economics Ch 9 Demand
 
NIOS X Economics Ch 11, Ch 12 and Ch 13 Determination of Price, Market and ro...
NIOS X Economics Ch 11, Ch 12 and Ch 13 Determination of Price, Market and ro...NIOS X Economics Ch 11, Ch 12 and Ch 13 Determination of Price, Market and ro...
NIOS X Economics Ch 11, Ch 12 and Ch 13 Determination of Price, Market and ro...
 

Ähnlich wie MySQL & Expression Engine EEUK2013

MySQL Scaling Presentation
MySQL Scaling PresentationMySQL Scaling Presentation
MySQL Scaling PresentationTommy Falgout
 
Ssis Best Practices Israel Bi U Ser Group Itay Braun
Ssis Best Practices   Israel Bi U Ser Group   Itay BraunSsis Best Practices   Israel Bi U Ser Group   Itay Braun
Ssis Best Practices Israel Bi U Ser Group Itay Braunsqlserver.co.il
 
Dynamics ax performance tuning
Dynamics ax performance tuningDynamics ax performance tuning
Dynamics ax performance tuningOutsourceAX
 
15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performanceguest9912e5
 
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourCaching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourWim Godden
 
Explore big data at speed of thought with Spark 2.0 and Snappydata
Explore big data at speed of thought with Spark 2.0 and SnappydataExplore big data at speed of thought with Spark 2.0 and Snappydata
Explore big data at speed of thought with Spark 2.0 and SnappydataData Con LA
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availabilityPeter Gfader
 
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 DeltaDatabricks
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Antonios Chatzipavlis
 
SQL Server 2014 for Developers (Cristian Lefter)
SQL Server 2014 for Developers (Cristian Lefter)SQL Server 2014 for Developers (Cristian Lefter)
SQL Server 2014 for Developers (Cristian Lefter)ITCamp
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuningJugal Shah
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Wim Godden
 
Understanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQLUnderstanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQLHyderabad Scalability Meetup
 
Loading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF LoftLoading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF LoftAmazon Web Services
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL ServerStephen Rose
 
IBM Pure Data System for Analytics (Netezza)
IBM Pure Data System for Analytics (Netezza)IBM Pure Data System for Analytics (Netezza)
IBM Pure Data System for Analytics (Netezza)Girish Srivastava
 

Ähnlich wie MySQL & Expression Engine EEUK2013 (20)

MySQL Scaling Presentation
MySQL Scaling PresentationMySQL Scaling Presentation
MySQL Scaling Presentation
 
Ssis Best Practices Israel Bi U Ser Group Itay Braun
Ssis Best Practices   Israel Bi U Ser Group   Itay BraunSsis Best Practices   Israel Bi U Ser Group   Itay Braun
Ssis Best Practices Israel Bi U Ser Group Itay Braun
 
Dynamics ax performance tuning
Dynamics ax performance tuningDynamics ax performance tuning
Dynamics ax performance tuning
 
15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance
 
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourCaching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
 
11g R2
11g R211g R2
11g R2
 
Explore big data at speed of thought with Spark 2.0 and Snappydata
Explore big data at speed of thought with Spark 2.0 and SnappydataExplore big data at speed of thought with Spark 2.0 and Snappydata
Explore big data at speed of thought with Spark 2.0 and Snappydata
 
SQL Server - High availability
SQL Server - High availabilitySQL Server - High availability
SQL Server - High availability
 
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
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
 
SQL Server 2014 for Developers (Cristian Lefter)
SQL Server 2014 for Developers (Cristian Lefter)SQL Server 2014 for Developers (Cristian Lefter)
SQL Server 2014 for Developers (Cristian Lefter)
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
 
DP-900.pdf
DP-900.pdfDP-900.pdf
DP-900.pdf
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
 
Understanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQLUnderstanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQL
 
Loading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF LoftLoading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF Loft
 
Troubleshooting SQL Server
Troubleshooting SQL ServerTroubleshooting SQL Server
Troubleshooting SQL Server
 
IBM Pure Data System for Analytics (Netezza)
IBM Pure Data System for Analytics (Netezza)IBM Pure Data System for Analytics (Netezza)
IBM Pure Data System for Analytics (Netezza)
 

Kürzlich hochgeladen

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
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
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 

Kürzlich hochgeladen (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
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
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 

MySQL & Expression Engine EEUK2013

  • 2. Why EEvolution? We believe that system efficiency is #1 as its the root to saving time and costs We provide cost effective solutions that have a return on investment We create software to solve problems
  • 3. Sound Familiar? - Why is my site is slow? - How can I get better performance? - What if I get an increase in visitors? - Search bots are killing my server! The database is the data store of your site ... but what can you do to get the best out of it? DESIGN FOR PERFORMANCE & SCALE
  • 4. Hardware: Platform Cost Performance Reliability Shared Low Low Medium VPS Low Low / Variable Medium Cloud Medium Medium Very High Dynamic Cloud Medium / PAYG Medium Very High Dedicated High Very High High Private Cloud Very High High Very High
  • 5. Hardware: CPU Cores (40%) - Single, Dual, Quad, Six, Hex Clock Speed (30%) - 2ghz, 3ghz, 4ghz Vendor (20%) - AMD vs Intel CPUs (10%) - Single vs Dual
  • 6. Hardware: Memory 25% of Server Memory should cover Database Indexes (not data in MyISAM) - key_buffer_size = 25%-35% server memory - PHPMyAdmin -> Status gives you a easy to read analysis and config recommendation. - Check RAM benchmarks when purchasing a server
  • 7. Hardware: Disk IOPS & Random Reads - SATA (75- 150) - SAS (140 - 210) - SSD (9,000 - 10,000,000) - RAMDisk (30,000 - 50,000, use with caution!) Hard disks need a good controller which is also an important factor for performance. Never mix disk types in a RAID
  • 8. Operating System Background Processes Linux (LAMP, cPanel, Plesk, Webmin) - CentOS Windows (WAMP) - Windows XP - Windows 7 - Server 2008 + Core Mode - Server 2012 + Core Mode
  • 9. Indexes SELECT = Read INSERT, UPDATE, DELETE = Read/Write - Writes will always force an index update. - Only index columns that you will JOIN ON or use in WHERE and ORDER BY. - Schedule an auto DB optimisation. - EE thottling has a big impact on DB writes - Index files can be stored on a different disk.
  • 10. Views, Stored Procedures, Functions - VIEWS are used for organisation not for performance. They can improve speed due to reduced lock times on large datasets. - STORED PROCEDURES are used for organisation not for performance. Don't give up the dynamically created statement for the 'best practice' it'll cost you in time. - FUNCTIONS are used for organisation not for performance. Stay away, you will only slow down your queries and waste time.
  • 11. Optimisation Maintenance Automatically optimise your database with a frequently run Cron or Scheduled Task - Tuning Primer Script - MySQL Tuning Script Don't forget to email yourself the results.
  • 12. Backup Master / Slave, Replication - Backup, Distribution - Read only, Analysis (RAMDisk) Clustering, RAID - Resilience, Automatic Failover Cron / Scheduled Task - Custom Script, perhaps Amazon S3 WHM - Scheduled Offsite Backup
  • 13. So... we're firing on all cylinders! Remember: - Get best value hardware for your budget - Configure for the correct situation - Use PHPMyAdmin Status & Tuning Script - Ensure Backup / Replication / Resilience ... Just in case, but always a must! NOW LETS LOOK AT EE...
  • 14. EE Settings - Disable what you don't need - Page, Template, DB, Tag Cache - Config: Disable Tracking
  • 15. Query Cache EE Dynamic Query Cache: - If you do not use future entries, expiring entries and random entries turn this on. - MySQL also has a cache mechanism which can improve performance by +200% when retrieving data from tables that do not change often. In general it has a 13% overhead. Set query_cache_size between 10MB and 150MB (avg size of query results * number of queries)
  • 16. Schema EE Schema - Entry data is wide not deep for scalability. - Relationships are centralised for simplicity. - Follow true relationships on your addons for best performance. - Index columns based on EE SQL Debug results. e.g. Searchable custom fields. Don't assume the schema is 100% efficient out of the box for EE or third party addons.
  • 17. Pre-calculated fields Do on-the-fly calculations in a dedicated field based on triggered events - Total number of sales - Total revenue per member - Total entry count per member or category - Run a sanity check/update when idle to ensure this is accurate regularly. - Gives you the flexibility to COUNT (accurate, latency) or SELECT (possibly inaccurate, v. fast)
  • 18. EE Entry DB Structure Get Entries From Table - {exp:query sql=""} SELECT *, t.*, t.entry_id, COUNT(DISTINCT p.cat_name) AS distinct_count, CASE WHEN IFNULL (NULLIF(field_id_15,''),'none')='none' THEN field_id_16 ELSE field_id_15 END AS choice FROM exp_channel_titles t INNER JOIN exp_channel_data d ON d.entry_id = t.entry_id INNER JOIN exp_members m ON m.member_id = t.author_id INNER JOIN exp_member_groups mg ON mg.group_id = m.group_id INNER JOIN exp_member_data md ON md.member_id = m.member_id LEFT OUTER JOIN exp_category_posts p ON p.entry_id = t.entry_id LEFT OUTER JOIN exp_categories c ON c.cat_id = p.cat_id LEFT OUTER JOIN exp_category_field_data cfd ON cfd.cat_id = c.cat_id WHERE t.status='open' OR t.entry_id = (0{entry_id}) OR t.entry_id IN (0{preload_replace_vars}) OR t. entry_id IN (0{snippet_var}) OR p.cat_url_title = '{segment_3}' OR d.field_id_16 LIKE 'test%' OR t. entry_date > UNIX_TIMESTAMP('2013-05-16 00:00:00') OR d.field_id_16 = d.field_id_17 OR t. entry_id IN ({snippet_subquery_chosen_categories}) ORDER BY t.entry_date DESC GROUP BY t.entry_id HAVING COUNT(p.cat_name) > 2
  • 19. Summary Remember: - Use this document as a reference - Plan your system resources, configure appropriately and use EE Debug Tools - Don't be afraid to use {exp:query} to get what you need. - Contact us if you need assistance in hardware or database decisions, optimisation or advice on your system... we're here to help.
  • 20. Thank You ! Any Questions? Tim Mahoney EEvolution Limited info@eevolution.co.uk