SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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...
 

Similar a 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
 

Similar a 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)
 

Último

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

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