SlideShare uma empresa Scribd logo
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Novidades do universo MySQL para PHP web developers 
Dezembro 2014 
Airton Lastori 
airton.lastori@oracle.com
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Safe Harbor Statement 
The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Edward Screven & Tomas Ulin no Open World 2014 
•[video] youtube.com/watch?v=fzCpd4j72jA 
Oracle Chief Corporate Architect & VP of MySQL Engineering
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
COMPONENTES da pilha 
MySQL: Aplicações Web da próxima geração Aplicações On-Premise, na Nuvem ou Distribuídas
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Oracle elevando o nível 
Novamente, um melhor MySQL para vocês 
2x Engineering Staff 
3x QA Staff 
2x Support Staff 
...em menos de 5 anos
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Enterprise Monitor 2.2 
MySQL Cluster 7.1 
MySQL Cluster Manager 1.0 
MySQL Workbench 5.2 
MySQL Database 5.5 
MySQL Enterprise Backup 3.5 
MySQL Enterprise Monitor 2.3 
MySQL Cluster Manager 1.1 
MySQL Enterprise Backup 3.7 
Todos GA! 
Oracle Products Certifications MySQL Windows Installer & Tools MySQL Enterprise Security MySQL Enterprise Scalability MySQL Enterprise Audit MySQL Cluster 7.2 MySQL Cluster Manager 1.3 MySQL Utilities MySQL Workbench 6.0 
Todos GA! 
MySQL Database 5.6 MySQL Cluster 7.3 MySQL Enterprise Monitor 3.0 MySQL Enterprise Backup 3.11 MySQL Fabric MySQL Workbench 6.2 MySQL Enterprise Encryption 
Todos GA! 
Disponível agora! 
Breve histórico: 2010 - 2014 
MySQL Database 5.7 DMR 
MySQL Cluster 7.4
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Central @ Oracle Open World 2014 
Alguns cases apresentados... 
•[slides] oracle.com/openworld/mysql
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Fonte: http://db-engines.com/en/ranking_trend (dezembro/14)
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Database 
Rápida retrospectiva 
Oracle Confidential – Internal/Restricted/Highly Restricted 
9
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Qual versão do MySQL Database você usa? 
SELECT @@version; 
+---------------------------------------+ 
| @@version | 
+---------------------------------------+ 
| 5.6.22-enterprise-commercial-advanced | 
+---------------------------------------+ 
1 row in set (0,00 sec) 
Oracle Confidential – Internal/Restricted/Highly Restricted 
10
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Até 16 CPU/cores 
Sun Microsystems 
MySQL 5.1 (InnoDB Plugin) 
Up to 48 CPU/cores Oracle MySQL 5.6 
Até 32 CPU/cores 
Oracle 
MySQL 5.5 
Até 4 CPU/cores 
MySQL AB 
MySQL 5.0 
2008 
Evolução da escalabilidade vertical do MySQL 
2009 
2010 
2013
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Qual o Storage Engine que você mais usa? 
SELECT engine, 
count(*) tables, 
concat(round(sum(table_rows)/1000000,2),'M') rows, 
concat(round(sum(data_length)/(1024*1024*1024),2),'G') data, 
concat(round(sum(index_length)/(1024*1024*1024),2),'G') idx, 
concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') total_size, 
round(sum(index_length)/sum(data_length),2) idxfrac 
FROM information_schema.TABLES 
GROUP BY engine 
ORDER BY sum(data_length+index_length) DESC LIMIT 10; 
+------------+--------+---------+---------+--------+------------+---------+ 
| engine | tables | rows | data | idx | total_size | idxfrac | 
+------------+--------+---------+---------+--------+------------+---------+ 
| MyISAM | 1243 | 941.06M | 244.09G | 4.37G | 248.47G | 0.02 | 
| InnoDB | 280 | 682.82M | 63.91G | 32.49G | 96.40G | 0.51 | 
| MRG_MyISAM | 1 | 13.66M | 6.01G | 0.00G | 6.01G | 0.00 | 
| MEMORY | 14 | 0.00M | 0.00G | 0.00G | 0.00G | NULL | 
+------------+--------+---------+---------+--------+------------+---------+ 
4 rows in set (14.02 sec) 
Oracle Confidential – Internal/Restricted/Highly Restricted 
12
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Enterprise Management Services and Utilities 
Backup & Recovery 
Monitor 
Workbench 
Utilities 
Connection Pool, SQL Interface, Parser, Optimizer, Caches 
Clients & Connectors Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl 
mysqld 
Clients and Apps 
Storage Engines 
InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc… 
Filesystems, Files & Logs 
Data, Index, Logs… 
Arquitetura MySQL Database
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MyISAM 
InnoDB 
NDB Cluster 
Transações 
✖ 
✔ 
✔ 
Nível de Lock 
Tabela 
Linha 
Linha 
Replicação 
Assíncrona ou 
Semi-síncrona 
Assíncrona ou 
Semi-síncrona, crash-safe 
Síncrona, Multi-master, crash-safe sem SPOF 
Foreign Keys 
✖ 
✔ 
✔ 
Full-text indexes 
✔ 
✔ 
✖ 
Compressão de dados 
somente Leitura 
✔ 
✖ 
Caches 
somente Índices 
Dados e Índices 
Dados e Índices 
Suporte Geoespacial 
Tipos de Dados e Índices 
Somente Tipos de Dados 
somente Tipos de Dados 
Limite de armazenamento 
256TB 
64TB 
384EB (~3TB em RAM) 
dev.mysql.com/doc/refman/5.6/en/storage-engines.html 
Storage Engines
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
InnoDB: default desde MySQL 5.5 
•ACID-compliant 
•Crash-safe 
•Foreign Keys 
Integridade dos dados 
•Row level locking 
•MVCC 
•Multi-thread 
Alta simultaneidade 
•48+ CPU/core 
•Replicação crash-safe 
•Backup e restore do buffer pool 
Escalabilidade vertical e horizontal 
•On-line DDL 
•SQL & NoSQL APIs 
•Transportable tablespaces 
Flexibilidade 
•Performance Schema 
•MySQL Enterprise Monitor 
•SYS Views 
Instrumentação 
dev.mysql.com/doc/refman/5.6/en/innodb-default-se.html
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL 5.6: GA há 17 meses 
•Performance: +234% para Leituras e +151% para Escritas, SSD 
•Escalabilidade: 48 cores 
•Flexibilidade: Memcached API, Full Text 
•Disponibilidade: mudanças online no schema, export/import tablespaces 
InnoDB 
•Performance: até centenas de vezes mais rápido em alguns cenários, estatísticas persistentes 
•Instrumentação: EXPLAINS com traces e para UPDATES e DELETES 
Otimizador 
•Performance: ganhos de 2x a 5x com paralelismo e group commit 
•Flexibilidade: novas topologias e rastreabilidade com GTIDs 
•Disponibilidade: automatização de failover e recovery 
Replicação 
•PERFORMANCE_SCHEMA mais completa 
Instrumentação 
•Segurança 
•Facilidade de uso 
•Flexibilidade 
•...E MAIS... 
Outras melhorias 
dev.mysql.com/tech-resources/articles/mysql-5.6-rc.html
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Qual biblioteca connector você usa? 
Oracle Confidential – Internal/Restricted/Highly Restricted 
17 
<?php phpinfo(); ?> 
Biblioteca mysqlnd é atual e recomendada, substituindo a antiga libmysql.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
PHP 
PHP Memory 
PHP Streams 
Infrastructure 
mysqlnd 
MySQL Server 
ext/mysql 
mysqli 
PDO_mysql 
… 
PHP Module (Extension) API 
PECL/mysqlnd_ms 
… 
PECL/mysqlnd_memcache 
mysqlnd: Native Driver PHP para MySQL
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
ext/mysql 
•depricated: uma das primeiras PHP extensions, mantido para PHP 4, sem novas funcionalidades no PHP 5 
•novas funcionalidades do MySQL não são suportadas 
mysqli 
•suporte completo às funcionalidades MySQL 
•Ativamente mantido e suportado pela Oracle 
PDO_mysql 
•o PHP Data Objects define uma inferface leve e consistente para acessar vários BDs 
•boa opção para aplicações simples e portáveis 
Extensões “Drivers” PHP para MySQL
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
mysqlnd vs libmysql 
Oracle Confidential – Internal/Restricted/Highly Restricted 
20 
php.net/manual/en/mysqlinfo.library.choosing.php
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Saiba mais sobre Replicação MySQL com PHP e PECL/mysqlnd_ms 
Apresentação no PHP Conference 2011... 
•[slides] slideshare.net/MySQLBR/replicao-mysql-e-php
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Atualize! 
MySQL 5.6, InnoDB e mysqlnd 
Oracle Confidential – Internal/Restricted/Highly Restricted 
23
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
No Windows: MySQL Installer 
Next, Next... Finish! 
dev.mysql.com/downloads/windows/installer
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
No Linux: repositórios YUM e APT para MySQL 
•Suporta as distribuições Enterprise Linux 
–RedHat Enterprise/Oracle Linux 
–Fedora 
–Debian/Ubuntu 
•Inclui os pacotes mais atuais 
–MySQL Database 
–MySQL Workbench 
–MySQL Connectors 
–MySQL Utilities 
Maneira simples e conveniente de instalar e atualizar produtos MySQL 
Mais de 50% dos downloads para Fedora/RedHat já são feitos do repositório 
www.alastori.com.br/2014/05/tutorial-de- instalacao-do-mysql-56-e.html
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
…ou manualmente via binários pré-compilados
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Convertendo tabelas para InnoDB 
Mais confiabilidade e escalabilidade 
•[documentação] mysql.com/doc/refman/5.6/en/converting-tables-to-innodb.html
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
mysqlnd 
•Já é default no PHP 5.4 e pode ser usado com PHP 5.3 
–Instalação: http://php.net/manual/en/mysqlnd.install.php ./configure --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd [other options] 
•Não é necessário atualizar scripts PHP* 
–mysql/ext, mysqli e PDO_MYSQL fazem a interface com a biblioteca, portanto nada muda do ponto de vista do desenvolvedor 
–*Se você usa data type “bit” veja http://php.net/manual/en/mysqlnd.incompatibilities.php
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Database 5.7 
Disponível para download e testes, ainda não recomendado para produção 
Oracle Confidential – Internal/Restricted/Highly Restricted 
29
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
5.7 DMR 1 
Abril 2013 
DMR 2 
Set 2013 
DMR 3 Dez 2013 
DMR 4 
Novas funcionalidades 
Disponível Agora! 
... 
5.6 GA 
Fev 2013 
MySQL 5.7 DMR 4
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
•MySQL 5.6 + melhorias! 
MySQL 5.7: DMR 4 
•InnoDB 
–melhor throughput transacional, disponibilidade, IO 
•Replication 
–melhor escalabilidade e disponibilidade 
•Performance Schema 
–melhores métricas e diagnósticos 
•Optimizer 
–melhores tempos nas queries, EXPLAINs, buffering e particionamento 
•Connections 
–taxas mais altas, sessões mais eficientes 
Disponível agora! dev.mysql.com/downloads/mysql
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
2X mais rápido que o MySQL 5.6 
Mais de 3X mais rápido que o MySQL 5.5 
630,000 QPS 
Intel(R) Xeon(R) CPU X7560 x86_64 5 sockets x 8 cores-HT (80 CPU threads) 2.27GHz, 256G RAM Oracle Linux 6.5
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL 5.7: Optimizer 
•Problema: Uma query em uma sessão está rodando há um longo tempo 
•Nova opção: EXPLAIN FOR CONNECTION de outra sessão 
–Descubra a causa-raíz do atraso 
–Otimize a query 
EXPLAIN de queries em execução 
EXPLAIN [FORMAT=(JSON|TRADITIONAL)] FOR CONNECTION <id>;
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL 5.7: Optimizer 
"query_block": { "select_id": 1 "cost_info": { "query_cost": "1.00“ }, ... 
•JSON EXPLAIN Expandido 
–Agora inclui toda informação de custo 
–Usado no Visual Explain do Workbench 6.1
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL 5.7: Server-side Statement Timeouts 
•Server Side statement timeouts 
–Global para o server, por sessão, ou individual por SELECT 
•Baseado na contribuição do Davi Arnaut 
–Expandido para Windows and Solaris, removida opção USER 
Contribuição do Davi Arnaut, nosso colega brasileiro no LinkedIn 
SELECT MAX_STATEMENT_TIME = 109 * FROM my_table;
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL 5.7: Performance Schema 
•Instrumentação ampliada de statements 
–Stored Procedures e Stored Functions 
–Prepared Statements 
–Transações 
Instrumentação de Statements 
•Instrumentos para Memória 
–Adicionados mais de 200 Memory Types 
•Agregação de estatísticas 
–Tipo de memória (cache, interna buffer, …) 
–Thread/usuário/host gerando operações indiretas na memória 
•Atributos incluem 
–Memória usada (bytes), Operações (counts), máximo/mínimo histórico 
Uso da Memória 
Métricas e instrumentações adicionais 
–Status dos Slaves 
–MDL lock 
Outros Dados adicionais
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
•Desenvolvimento guiado pelo feedback positivo no ps_helper 
–Mais de 80 views, versionadas, auto-atualizáveis e de acordo com a versão do server 
–Suporta MySQL 5.5, 5.6, and 5.7 
•SYS é similar a: 
–Oracle V$ catalog views 
–Microsoft SQL Server DMVs (Dynamic Management Views) 
–IBM DB2 SYSIBM catalog 
•Disponível no Workbench 6.1+ ou via GitHub 
–Workbench inclui “one click” reports 
MySQL SYS Schema 
Views simplificadas na Performance Schema & Information Schema
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL 5.7.4: Replication 
•Maior throughput 
–Slave: aplica transações em paralelo, mesmo pertencentes ao mesmo database/schema 
–Master: melhor sincronização entre sessões dos usuários de replicaçãobetter synchronization between replication-user sessions 
•DMR4 melhora performance no master para Semi-synchronous Replication 
•Replicação sem perda com Semi-sync 
•Diagnóstico e monitoramento dos slaves via Performance Schema 
•Filtros dinâmicos de replicação: mude filtros sem reiniciar o servidor 
Melhor Performance, Usabilidade e Disponibilidade
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Multi-Threaded Slave 
•A evolução… 
–2010: Inter-schema MTS (labs) 
–2013: Inter-schema MTS (5.6 GA) 
–2013: Intra-schema MTS (5.7.2 DMR) 
–Hoje: tamanho configurável de group commit buckets – balanço de latência de commits no master (labs) 
•Ganho de 6X throughput no slave 
Slave no mesmo passo que o Master 
0	 500	 1000	 1500	 2000	 2500	 3000	 3500	 4000	 4500	 0	4	8	12	16	22	24	28	32	36	40	44	48	 Transacons	per	second	 Slave	Worker	Threads	 Slave	Throughput	 Larger	BGC	bucket	 No	Master	Impact	 Baseline
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Multi-Source Replication 
•Consolida updates de múltiplos Masters em um Slave 
–Visão consolidada 
–Novas topologias 
–Ponto centralizado de backup 
–Relatórios mais fáceis 
•Compatível com Semi-Synchronous Replication & Multi-Thread Slaves 
•Master-specific slave filters 
•Aplicação continua responsável por manter data sets não-conflitantes entre as diversas fontes 
Binlog 
Master 1 
Binlog 
Master 2 
… 
… 
Binlog 
Master N 
IO 1 
Relay 1 
Coordinator 
W1 
W2 
… 
WX 
IO 2 
Relay 2 
Coordinator 
W1 
W2 
… 
WX 
… 
… 
Coordinator 
W1 
W2 
… 
WX 
IO N 
Relay N 
Coordinator 
W1 
W2 
… 
WX 
Slave
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL 5.7: InnoDB 
•Online Alter Table melhorado 
–Renomear índice online, mudar varchar, “optimize” 
•Melhor integração com FusionIO 
–Quando DirectFS for detectado, Doublewrite buffer desabilitado automaticamente 
–“Dirty Page” Flushing paralelizado 
–Maior throughput, performance e escalabilidade 
•Partições – suporte ao recurso Transportable Tablespaces (TTS) 
–TTS para partições individuais 
Diversas Melhorias
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL GIS 
•InnoDB Spatial Index 
–Suporte a índices R-tree otimizados 
•Integração com Boost.Geometry 
–Melhor precisão 
–Suporte a tipos e funções adicionais 
–Performance melhorada 
–Open Geospatial Consortium compliance 
–Colaboração com melhorias no Boost.Geometry
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Saiba mais... 
Detalhes sobre “O que há de novo no MySQL 5.7 (até agora) 
•[blog post] http://www.alastori.com.br/2014/11/o- que-ha-de-novo-no-mysql-5.html
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Workbench 6.2 
GA, pronto para produção 
Oracle Confidential – Internal/Restricted/Highly Restricted 
45
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Workbench 6.1 
•Performance Dashboard 
–Veja a performance do servidor com estatísticas e gráficos em tempo real 
–“SYS” Schema: Performance Schema Reports 
•Visual Explain 2.0 
–Nova saída gráfica melhorada, com layout mais simples e limpo 
•Suporte ao Enterprise Backup melhorado 
–Configuração automática para backups já existentes 
–Gerenciamento melhorado para contas de backup novas e já existentes
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Workbench 6.1 
Dashboards: Performance & Status 
Analyze hotspots, costly SQL statements, wait times, locks, InnoDB stats, and more 
Network, Server, InnoDB
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Oracle Confidential – Internal/Restricted/Highly Restricted 
50
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Workbench 6.2 
•A new spatial data viewer, allowing graphical views of result sets containing GEOMETRY data and taking advantage of the new GIS capabilities in MySQL 5.7. 
•Support for new MySQL 5.7.4 SQL syntax and configuration options. 
•Metadata Locks View shows the locks connections are blocked or waiting on. 
•MySQL Fabric cluster connectivity – Browsing, view status, and connect to any MySQL instance in a Fabric Cluster. 
•MS Access migration Wizard – easily move to MySQL Databases. 
•Other significant usability improvements were made, aiming to raise productivity for advanced and new users: 
–Direct shortcut buttons to commonly used features in the schema tree. 
–Improved results handling. Columns have better auto-sizing and their widths are saved. Fonts can also be customized. Results “pinned” to persist viewing data. 
–A convenient Run SQL Script command to directly execute SQL scripts, without loading them first. 
–Database Modeling has been updated to allow changes to the formatting of note objects and attached SQL scripts can now be included in forward engineering and synchronization scripts. 
–Integrated Visual Explain within the result set panel. 
–Visual Explain drill down for large to very large explain plans. 
–Shared SQL snippets in the SQL Editor, allowing multiple users to share SQL code by storing it within a MySQL instance. 
•And much more… 
Oracle Confidential – Internal/Restricted/Highly Restricted 
51
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Utilities & Fabric 1.5 
GA, pronto para produção 
Oracle Confidential – Internal/Restricted/Highly Restricted 
52
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Utilities 1.5 
•Automatiza tarefas comuns de DevOps 
–Replication: provisionamento, teste, monitoramento e failover 
–Comparação de Databases: verificação de consistência 
–Manutenção: users, connections, tables 
–Auditoria 
•Scripts em Python 
–Pacote standalone ou via MySQL Workbench 
–Extensíveis para incluir scripts customizados (usa Python library) 
•Novo: Cloud integration: Openstack Nova, “Server providers” https://oracleus.activeevents.com/2014/connect/fileDownload/session/CF4F217F7E733EF6066ED14D5CB7371C/CON5636_Kindahl- MySQLFabricElasticityOOW2014.pdf 
Útil para DevOps e gerenciamento automatizado do MySQL
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
HA group 
MySQL Fabric 1.5 (MySQL Utilities) 
•Alta disponibilidade: 
–Monitoramento do Server com failover automático e transparente para aplicação 
•Sem Proxy, sem latência extra e SPoF 
Alta-disponibilidade + escalabilidade de escrita com sharding 
Connector 
Application 
SQL 
Read-slaves 
Read-slaves 
HA group 
MySQL Fabric 
•Escalabilidade de escrita com sharding: 
–Aplicação define a shard key (Range ou Hash) 
–Ferramentas para re-sharding 
–Tabelas globais & global updates 
•Conectores devem ser “Fabric-aware”: 
–Java, PHP, Python
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Cluster 7.4 
Beta, disponível para download e testes 
Oracle Confidential – Internal/Restricted/Highly Restricted 
55
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Cluster Data Nodes 
NDB 
NDB 
Connection Pool, SQL Interface, Parser, Optimizer, Caches 
Enterprise Management Services and Utilities 
Backup & Recovery 
Monitor 
Workbench 
Utilities 
Clients & Connectors 
Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl 
Storage Engines 
InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc… 
Filesystems, Files & Logs 
Data, Index, Logs… 
mysqld 
Clients and Apps 
ndbd 
mgm_ndbd 
Management 
Arquitetura MySQL Cluster
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Cluster 7.4 
• Ganho de Performance sobre v7.3 
– 47% (Read-Only) 
– 38% (Read-Write) 
Melhor performance e simplicidade operacional 
 Restarts mais rápidos dos nós 
– Recovering nodes rejoin the cluster faster
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Soluções de HA homologadas pela Oracle 
MySQL Replication 
MySQL Fabric 
Oracle VM Template 
Oracle Clusterware 
Solaris Cluster 
Windows Cluster 
DRBD 
MySQL Cluster 
App Auto-Failover 
✖ 
✔ 
✔ 
✔ 
✔ 
✔ 
✔ 
✔ 
Data Layer Auto-Failover 
✖ 
✔ 
✔ 
✔ 
✔ 
✔ 
✔ 
✔ 
Zero Data Loss 
MySQL 5.7 
MySQL 5.7 
✔ 
✔ 
✔ 
✔ 
✔ 
✔ 
Platform Support 
All 
All 
Linux 
Linux 
Solaris 
Windows 
Linux 
All 
Clustering Mode 
Master + Slaves 
Master + Slaves 
Active/Passive 
Active/Passive 
Active/Passive 
Active/Passive 
Active/Passive 
Multi- Master 
Failover Time 
N/A 
Secs 
Secs + 
Secs + 
Secs + 
Secs + 
Secs + 
< 1 Sec 
Scale-out 
Reads 
✔ 
✖ 
✖ 
✖ 
✖ 
✖ 
✔ 
Cross-shard operations 
N/A 
✖ 
N/A 
N/A 
N/A 
N/A 
N/A 
✔ 
Transparent routing 
✖ 
For HA 
✔ 
✔ 
✔ 
✔ 
✔ 
✔ 
Shared Nothing 
✔ 
✔ 
✖ 
✖ 
✖ 
✖ 
✔ 
✔ 
Storage Engine 
InnoDB+ 
InnoDB+ 
InnoDB+ 
InnoDB+ 
InnoDB+ 
InnoDB+ 
InnoDB+ 
NDB 
Single Vendor Support 
✔ 
✔ 
✔ 
✔ 
✔ 
✖ 
✔ 
✔
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Enterprise Backup 3.11 
GA, pronto para produção 
Oracle Confidential – Internal/Restricted/Highly Restricted 
59
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Enterprise Backup 3.11 
•Backup na Nuvem: Amazon S3 
•Backup otimista: muito melhor para backups grandes com pouca variação 
•Full Instance Backup: clone com mais facilidade, ideal para replicação 
•Novas opções de compressão 
•Mais seguro: Advanced Encryption Standard (AES) 
–Compressão e/ou aplicação de seguranção em 1 único passo 
•Restore parcial online 
•Sem área de staging para backup e restore 
Velocidade, compressão, flexibilidade, eficiência e segurança
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Enterprise Monitor 3.0 
GA, pronto para produção 
Oracle Confidential – Internal/Restricted/Highly Restricted 
61
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Enterprise Monitor 3.0 
•Monitoramento em tempo real da performance e disponibilidade 
•Encontre e corrija problemas visualmente 
•Monitore discos e faça capacity planning 
•Comece a monitorar em 10 minutos 
•Arquitetura que não exige agentes 
•Agente remoto monitora SO
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Oracle Confidential – Internal/Restricted/Highly Restricted 
63
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Commercial Extensions 
Plug-ins disponíveis na Edição Enterprise 
Oracle Confidential – Internal/Restricted/Highly Restricted 
64
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Enterprise Scalability 
•Thread Pool Plugin 
•Escalabilidade vertical para múltiplas conexões simultâneas 
•Mais de 60x escalabilidade de leitura e escrita 
MySQL Enterprise Secutiry 
•External Authentication Plugins 
•Delega autenticação para diretório de usuários, como AD, LDAP 
•Linux e Windows 
Oracle Confidential – Internal/Restricted/Highly Restricted 
65 
MySQL Enterprise Audit 
•Implementa logs de auditoria com um único comando de instalação 
•Flexibilidade na configuração 
•Aderente às principais normas de regulação 
MySQL Enterprise Encryption 
•Funções do OpenSSL via SQL 
•Gerenciamento de Certificados 
•Criptografia Assimétrica 
Plugins Comerciais
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL Enterprise Edition 
Contatos comerciais 
Marcos Trujillo 
Enterprise Sales, Oracle 
marcos.trujillo@oracle.com 
Alison Rabelo 
OEM/ISV Sales, Oracle 
alison.rabelo@oracle.com
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
MySQL for 
Beginners Ed 3 
MySQL for Database Administrators Ed 3.1 
MySQL Performance Tuning 
MySQL High Availability 
MySQL Cluster 
MySQL DBA 
Introduction to 
MySQL 5.5 
MySQL Developers Techniques 
MySQL for 
Beginners Ed 3 
MySQL and PHP Developing Dynamic Web Applications 
MySQL for Developers Ed 2 
MySQL Advanced Stored Procedures 
MySQLDeveloper 
education.oracle.com/mysql 
Opcional 
Necessário 
Treinamentos e certificações 
Oracle Certified Professional, MySQL 5.6 DBA 
Oracle Certified Expert, MySQL Cluster DBA 
Certificações 
Oracle Certified Professional, MySQL 5.6 Developer
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
@MySQLBR 
meetup.com/MySQL-BR 
facebook.com/MySQLBR 
pt.planet.mysql.com
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 
Sumário 
•A Oracle aumenta o nível do MySQL entregando para a comunidade com mais velocidade e qualidade: 
–GA: MySQL Cluster 7.3, MySQL Workbench 6.2, MySQL Utilities, MySQL Fabric e muito mais! 
–DMRs & Labs: MySQL 5.7, Multi-source Replication, GIS, MySQL Cluster 7.4... 
•A Oracle investe no MySQL como solução para Aplicações Web, Cloud e Big Data (distribuídas) da próxima geração. 
•Teste as novidades e nos dê Feedback!
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014

Mais conteúdo relacionado

PDF
Alta-disponibilidade com MySQL
PDF
Alta-disponibilidade e alta performance com o MySQL Cluster 7.3
PDF
Replicação MySQL e PHP
PDF
MySQL Cluster - visão geral
PDF
MySQL Alta Performance & Alta Disponibilidade
PDF
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
PDF
Guia essencial para embarcar o MySQL em seu produto
PDF
Oracle Premier Support para MySQL
Alta-disponibilidade com MySQL
Alta-disponibilidade e alta performance com o MySQL Cluster 7.3
Replicação MySQL e PHP
MySQL Cluster - visão geral
MySQL Alta Performance & Alta Disponibilidade
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
Guia essencial para embarcar o MySQL em seu produto
Oracle Premier Support para MySQL

Mais procurados (20)

PDF
Alta disponibilidade com MySQL Enterprise
PDF
Arquiteturas de referência MySQL
PDF
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
PDF
Segurança no MySQL
PDF
Alta disponibilidade no MySQL 5.7 GUOB 2016
PDF
MySQL é de graça?
PDF
Serviços Escaláveis e de Alta Performance com MySQL e Java
PDF
Novidades do Universo MySQL Maio 2014
PDF
MySQL Enterprise Monitor para Desenvolvedores
PDF
MySQL e Oracle para DBAs
PDF
Desenvolvendo serviços escaláveis e de alta performance com MySQL
PDF
Novidades do MySQL para desenvolvedores ago15
PDF
MySQL Enterprise (outubro-2011)
PPT
My sql enterprise vs community
PDF
Replicação e alta disponibilidade by wagner bianchi -
PDF
Barracuda Backup: Solução Completa de Proteção de Dados e Disaster Recovery I...
PDF
Apresentação MySQL Enterprise
PDF
MySQL Cluster - visão geral
PDF
MySQL 5.6 com memcached
PPTX
WebSeminario Oracle
Alta disponibilidade com MySQL Enterprise
Arquiteturas de referência MySQL
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
Segurança no MySQL
Alta disponibilidade no MySQL 5.7 GUOB 2016
MySQL é de graça?
Serviços Escaláveis e de Alta Performance com MySQL e Java
Novidades do Universo MySQL Maio 2014
MySQL Enterprise Monitor para Desenvolvedores
MySQL e Oracle para DBAs
Desenvolvendo serviços escaláveis e de alta performance com MySQL
Novidades do MySQL para desenvolvedores ago15
MySQL Enterprise (outubro-2011)
My sql enterprise vs community
Replicação e alta disponibilidade by wagner bianchi -
Barracuda Backup: Solução Completa de Proteção de Dados e Disaster Recovery I...
Apresentação MySQL Enterprise
MySQL Cluster - visão geral
MySQL 5.6 com memcached
WebSeminario Oracle
Anúncio

Semelhante a Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014 (20)

PDF
Novidades do Universo MySQL julho-15
PDF
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
PDF
Novidades do Universo MySQL Agosto 2014
PPTX
Uso estratégico do MySQL para empresas de TI: Novidades e Futuro
PDF
MySQL - o banco de dados open source mais popular do mundo
PDF
MySQL sobreviverá à nuvem?
PDF
MySQL: o banco de dados open source mais popular do mundo
PDF
MySQL e Oracle para Desenvolvedores
PDF
MySQL e Oracle para Desenvolvedores
PDF
Recursos e Benefícios do MySQL
PDF
MySQL no Windows: implementação eficiente de novas aplicações
PDF
MySQL no Windows
PDF
MySQL Cluster - visão geral
PDF
MySQL - visão geral
PDF
Mais performance com o MySQL 5.6
PDF
MySQL para Desenvolvedores de Produto
PDF
MySQL - the database
PDF
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
PDF
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
PDF
Realmente devo pensar na versão Enterprise do MySQL?
Novidades do Universo MySQL julho-15
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Novidades do Universo MySQL Agosto 2014
Uso estratégico do MySQL para empresas de TI: Novidades e Futuro
MySQL - o banco de dados open source mais popular do mundo
MySQL sobreviverá à nuvem?
MySQL: o banco de dados open source mais popular do mundo
MySQL e Oracle para Desenvolvedores
MySQL e Oracle para Desenvolvedores
Recursos e Benefícios do MySQL
MySQL no Windows: implementação eficiente de novas aplicações
MySQL no Windows
MySQL Cluster - visão geral
MySQL - visão geral
Mais performance com o MySQL 5.6
MySQL para Desenvolvedores de Produto
MySQL - the database
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
Realmente devo pensar na versão Enterprise do MySQL?
Anúncio

Mais de MySQL Brasil (15)

PDF
MySQL como Document Store PHP Conference 2017
PDF
MySQL no Paypal Tesla e Uber
PDF
MySQL 8.0.1 DMR
PDF
MySQL Roadmap NoSQL HA Fev17
PDF
5 razões estratégicas para usar MySQL
PDF
MySQL 5.7 como Document Store
PDF
Enabling digital transformation with MySQL
PDF
Alta Disponibilidade no MySQL 5.7
PDF
NoSQL no MySQL 5.7
PDF
OpenStack & MySQL
PDF
10 Razões para Usar MySQL em Startups
PDF
Estratégias de Segurança e Gerenciamento para MySQL
PDF
MySQL The State of the Dolphin - jun15
PDF
MySQL Enterprise Edition Portfolio
PDF
Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...
MySQL como Document Store PHP Conference 2017
MySQL no Paypal Tesla e Uber
MySQL 8.0.1 DMR
MySQL Roadmap NoSQL HA Fev17
5 razões estratégicas para usar MySQL
MySQL 5.7 como Document Store
Enabling digital transformation with MySQL
Alta Disponibilidade no MySQL 5.7
NoSQL no MySQL 5.7
OpenStack & MySQL
10 Razões para Usar MySQL em Startups
Estratégias de Segurança e Gerenciamento para MySQL
MySQL The State of the Dolphin - jun15
MySQL Enterprise Edition Portfolio
Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...

Último (19)

PDF
Otimizador de planejamento e execução no SAP Transportation Management, TM120...
PDF
Fullfilment AI - Forum ecommerce 2025 // Distrito e Total Express
PDF
COBITxITIL-Entenda as diferença em uso governança TI
PDF
Fundamentos de gerenciamento de ordens e planejamento no SAP TransportationMa...
PPTX
Informática Aplicada Informática Aplicada Plano de Ensino - estudo de caso NR...
PPTX
Aula 18 - Manipulacao De Arquivos python
PDF
20250805_ServiceNow e a Arquitetura Orientada a Serviços (SOA) A Base para Ap...
PDF
Aula04-Academia Heri- Tecnologia Geral 2025
PPTX
Aula16ManipulaçãoDadosssssssssssssssssssssssssssss
PDF
Custos e liquidação no SAP Transportation Management, TM130 Col18
PPTX
Gestao-de-Bugs-em-Software-Introducao.pptxxxxxxxx
PDF
Processos na gestão de transportes, TM100 Col18
PPTX
Programação - Linguagem C - Variáveis, Palavras Reservadas, tipos de dados, c...
PPTX
Como-se-implementa-um-softwareeeeeeeeeeeeeeeeeeeeeeeee.pptx
PDF
Mergulho profundo técnico para gestão de transportes no SAP S/4HANA, S4TM6 Col14
PDF
Apple Pippin Uma breve introdução. - David Glotz
PPTX
BANCO DE DADOS - AULAS INICIAIS-sgbd.pptx
PDF
Custos e faturamento no SAP S/4HANA Transportation Management, S4TM3 Col26
PDF
Gestão de transportes básica no SAP S/4HANA, S4611 Col20
Otimizador de planejamento e execução no SAP Transportation Management, TM120...
Fullfilment AI - Forum ecommerce 2025 // Distrito e Total Express
COBITxITIL-Entenda as diferença em uso governança TI
Fundamentos de gerenciamento de ordens e planejamento no SAP TransportationMa...
Informática Aplicada Informática Aplicada Plano de Ensino - estudo de caso NR...
Aula 18 - Manipulacao De Arquivos python
20250805_ServiceNow e a Arquitetura Orientada a Serviços (SOA) A Base para Ap...
Aula04-Academia Heri- Tecnologia Geral 2025
Aula16ManipulaçãoDadosssssssssssssssssssssssssssss
Custos e liquidação no SAP Transportation Management, TM130 Col18
Gestao-de-Bugs-em-Software-Introducao.pptxxxxxxxx
Processos na gestão de transportes, TM100 Col18
Programação - Linguagem C - Variáveis, Palavras Reservadas, tipos de dados, c...
Como-se-implementa-um-softwareeeeeeeeeeeeeeeeeeeeeeeee.pptx
Mergulho profundo técnico para gestão de transportes no SAP S/4HANA, S4TM6 Col14
Apple Pippin Uma breve introdução. - David Glotz
BANCO DE DADOS - AULAS INICIAIS-sgbd.pptx
Custos e faturamento no SAP S/4HANA Transportation Management, S4TM3 Col26
Gestão de transportes básica no SAP S/4HANA, S4611 Col20

Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014

  • 1. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Novidades do universo MySQL para PHP web developers Dezembro 2014 Airton Lastori airton.lastori@oracle.com
  • 2. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Edward Screven & Tomas Ulin no Open World 2014 •[video] youtube.com/watch?v=fzCpd4j72jA Oracle Chief Corporate Architect & VP of MySQL Engineering
  • 4. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | COMPONENTES da pilha MySQL: Aplicações Web da próxima geração Aplicações On-Premise, na Nuvem ou Distribuídas
  • 5. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle elevando o nível Novamente, um melhor MySQL para vocês 2x Engineering Staff 3x QA Staff 2x Support Staff ...em menos de 5 anos
  • 6. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Monitor 2.2 MySQL Cluster 7.1 MySQL Cluster Manager 1.0 MySQL Workbench 5.2 MySQL Database 5.5 MySQL Enterprise Backup 3.5 MySQL Enterprise Monitor 2.3 MySQL Cluster Manager 1.1 MySQL Enterprise Backup 3.7 Todos GA! Oracle Products Certifications MySQL Windows Installer & Tools MySQL Enterprise Security MySQL Enterprise Scalability MySQL Enterprise Audit MySQL Cluster 7.2 MySQL Cluster Manager 1.3 MySQL Utilities MySQL Workbench 6.0 Todos GA! MySQL Database 5.6 MySQL Cluster 7.3 MySQL Enterprise Monitor 3.0 MySQL Enterprise Backup 3.11 MySQL Fabric MySQL Workbench 6.2 MySQL Enterprise Encryption Todos GA! Disponível agora! Breve histórico: 2010 - 2014 MySQL Database 5.7 DMR MySQL Cluster 7.4
  • 7. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Central @ Oracle Open World 2014 Alguns cases apresentados... •[slides] oracle.com/openworld/mysql
  • 8. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Fonte: http://db-engines.com/en/ranking_trend (dezembro/14)
  • 9. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Database Rápida retrospectiva Oracle Confidential – Internal/Restricted/Highly Restricted 9
  • 10. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Qual versão do MySQL Database você usa? SELECT @@version; +---------------------------------------+ | @@version | +---------------------------------------+ | 5.6.22-enterprise-commercial-advanced | +---------------------------------------+ 1 row in set (0,00 sec) Oracle Confidential – Internal/Restricted/Highly Restricted 10
  • 11. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Até 16 CPU/cores Sun Microsystems MySQL 5.1 (InnoDB Plugin) Up to 48 CPU/cores Oracle MySQL 5.6 Até 32 CPU/cores Oracle MySQL 5.5 Até 4 CPU/cores MySQL AB MySQL 5.0 2008 Evolução da escalabilidade vertical do MySQL 2009 2010 2013
  • 12. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Qual o Storage Engine que você mais usa? SELECT engine, count(*) tables, concat(round(sum(table_rows)/1000000,2),'M') rows, concat(round(sum(data_length)/(1024*1024*1024),2),'G') data, concat(round(sum(index_length)/(1024*1024*1024),2),'G') idx, concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') total_size, round(sum(index_length)/sum(data_length),2) idxfrac FROM information_schema.TABLES GROUP BY engine ORDER BY sum(data_length+index_length) DESC LIMIT 10; +------------+--------+---------+---------+--------+------------+---------+ | engine | tables | rows | data | idx | total_size | idxfrac | +------------+--------+---------+---------+--------+------------+---------+ | MyISAM | 1243 | 941.06M | 244.09G | 4.37G | 248.47G | 0.02 | | InnoDB | 280 | 682.82M | 63.91G | 32.49G | 96.40G | 0.51 | | MRG_MyISAM | 1 | 13.66M | 6.01G | 0.00G | 6.01G | 0.00 | | MEMORY | 14 | 0.00M | 0.00G | 0.00G | 0.00G | NULL | +------------+--------+---------+---------+--------+------------+---------+ 4 rows in set (14.02 sec) Oracle Confidential – Internal/Restricted/Highly Restricted 12
  • 13. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Enterprise Management Services and Utilities Backup & Recovery Monitor Workbench Utilities Connection Pool, SQL Interface, Parser, Optimizer, Caches Clients & Connectors Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl mysqld Clients and Apps Storage Engines InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc… Filesystems, Files & Logs Data, Index, Logs… Arquitetura MySQL Database
  • 14. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MyISAM InnoDB NDB Cluster Transações ✖ ✔ ✔ Nível de Lock Tabela Linha Linha Replicação Assíncrona ou Semi-síncrona Assíncrona ou Semi-síncrona, crash-safe Síncrona, Multi-master, crash-safe sem SPOF Foreign Keys ✖ ✔ ✔ Full-text indexes ✔ ✔ ✖ Compressão de dados somente Leitura ✔ ✖ Caches somente Índices Dados e Índices Dados e Índices Suporte Geoespacial Tipos de Dados e Índices Somente Tipos de Dados somente Tipos de Dados Limite de armazenamento 256TB 64TB 384EB (~3TB em RAM) dev.mysql.com/doc/refman/5.6/en/storage-engines.html Storage Engines
  • 15. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | InnoDB: default desde MySQL 5.5 •ACID-compliant •Crash-safe •Foreign Keys Integridade dos dados •Row level locking •MVCC •Multi-thread Alta simultaneidade •48+ CPU/core •Replicação crash-safe •Backup e restore do buffer pool Escalabilidade vertical e horizontal •On-line DDL •SQL & NoSQL APIs •Transportable tablespaces Flexibilidade •Performance Schema •MySQL Enterprise Monitor •SYS Views Instrumentação dev.mysql.com/doc/refman/5.6/en/innodb-default-se.html
  • 16. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL 5.6: GA há 17 meses •Performance: +234% para Leituras e +151% para Escritas, SSD •Escalabilidade: 48 cores •Flexibilidade: Memcached API, Full Text •Disponibilidade: mudanças online no schema, export/import tablespaces InnoDB •Performance: até centenas de vezes mais rápido em alguns cenários, estatísticas persistentes •Instrumentação: EXPLAINS com traces e para UPDATES e DELETES Otimizador •Performance: ganhos de 2x a 5x com paralelismo e group commit •Flexibilidade: novas topologias e rastreabilidade com GTIDs •Disponibilidade: automatização de failover e recovery Replicação •PERFORMANCE_SCHEMA mais completa Instrumentação •Segurança •Facilidade de uso •Flexibilidade •...E MAIS... Outras melhorias dev.mysql.com/tech-resources/articles/mysql-5.6-rc.html
  • 17. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Qual biblioteca connector você usa? Oracle Confidential – Internal/Restricted/Highly Restricted 17 <?php phpinfo(); ?> Biblioteca mysqlnd é atual e recomendada, substituindo a antiga libmysql.
  • 18. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | PHP PHP Memory PHP Streams Infrastructure mysqlnd MySQL Server ext/mysql mysqli PDO_mysql … PHP Module (Extension) API PECL/mysqlnd_ms … PECL/mysqlnd_memcache mysqlnd: Native Driver PHP para MySQL
  • 19. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | ext/mysql •depricated: uma das primeiras PHP extensions, mantido para PHP 4, sem novas funcionalidades no PHP 5 •novas funcionalidades do MySQL não são suportadas mysqli •suporte completo às funcionalidades MySQL •Ativamente mantido e suportado pela Oracle PDO_mysql •o PHP Data Objects define uma inferface leve e consistente para acessar vários BDs •boa opção para aplicações simples e portáveis Extensões “Drivers” PHP para MySQL
  • 20. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | mysqlnd vs libmysql Oracle Confidential – Internal/Restricted/Highly Restricted 20 php.net/manual/en/mysqlinfo.library.choosing.php
  • 21. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Saiba mais sobre Replicação MySQL com PHP e PECL/mysqlnd_ms Apresentação no PHP Conference 2011... •[slides] slideshare.net/MySQLBR/replicao-mysql-e-php
  • 22. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Atualize! MySQL 5.6, InnoDB e mysqlnd Oracle Confidential – Internal/Restricted/Highly Restricted 23
  • 23. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | No Windows: MySQL Installer Next, Next... Finish! dev.mysql.com/downloads/windows/installer
  • 24. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | No Linux: repositórios YUM e APT para MySQL •Suporta as distribuições Enterprise Linux –RedHat Enterprise/Oracle Linux –Fedora –Debian/Ubuntu •Inclui os pacotes mais atuais –MySQL Database –MySQL Workbench –MySQL Connectors –MySQL Utilities Maneira simples e conveniente de instalar e atualizar produtos MySQL Mais de 50% dos downloads para Fedora/RedHat já são feitos do repositório www.alastori.com.br/2014/05/tutorial-de- instalacao-do-mysql-56-e.html
  • 25. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | …ou manualmente via binários pré-compilados
  • 26. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Convertendo tabelas para InnoDB Mais confiabilidade e escalabilidade •[documentação] mysql.com/doc/refman/5.6/en/converting-tables-to-innodb.html
  • 27. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | mysqlnd •Já é default no PHP 5.4 e pode ser usado com PHP 5.3 –Instalação: http://php.net/manual/en/mysqlnd.install.php ./configure --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd [other options] •Não é necessário atualizar scripts PHP* –mysql/ext, mysqli e PDO_MYSQL fazem a interface com a biblioteca, portanto nada muda do ponto de vista do desenvolvedor –*Se você usa data type “bit” veja http://php.net/manual/en/mysqlnd.incompatibilities.php
  • 28. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Database 5.7 Disponível para download e testes, ainda não recomendado para produção Oracle Confidential – Internal/Restricted/Highly Restricted 29
  • 29. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 5.7 DMR 1 Abril 2013 DMR 2 Set 2013 DMR 3 Dez 2013 DMR 4 Novas funcionalidades Disponível Agora! ... 5.6 GA Fev 2013 MySQL 5.7 DMR 4
  • 30. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | •MySQL 5.6 + melhorias! MySQL 5.7: DMR 4 •InnoDB –melhor throughput transacional, disponibilidade, IO •Replication –melhor escalabilidade e disponibilidade •Performance Schema –melhores métricas e diagnósticos •Optimizer –melhores tempos nas queries, EXPLAINs, buffering e particionamento •Connections –taxas mais altas, sessões mais eficientes Disponível agora! dev.mysql.com/downloads/mysql
  • 31. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 2X mais rápido que o MySQL 5.6 Mais de 3X mais rápido que o MySQL 5.5 630,000 QPS Intel(R) Xeon(R) CPU X7560 x86_64 5 sockets x 8 cores-HT (80 CPU threads) 2.27GHz, 256G RAM Oracle Linux 6.5
  • 32. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Optimizer •Problema: Uma query em uma sessão está rodando há um longo tempo •Nova opção: EXPLAIN FOR CONNECTION de outra sessão –Descubra a causa-raíz do atraso –Otimize a query EXPLAIN de queries em execução EXPLAIN [FORMAT=(JSON|TRADITIONAL)] FOR CONNECTION <id>;
  • 33. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Optimizer "query_block": { "select_id": 1 "cost_info": { "query_cost": "1.00“ }, ... •JSON EXPLAIN Expandido –Agora inclui toda informação de custo –Usado no Visual Explain do Workbench 6.1
  • 34. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Server-side Statement Timeouts •Server Side statement timeouts –Global para o server, por sessão, ou individual por SELECT •Baseado na contribuição do Davi Arnaut –Expandido para Windows and Solaris, removida opção USER Contribuição do Davi Arnaut, nosso colega brasileiro no LinkedIn SELECT MAX_STATEMENT_TIME = 109 * FROM my_table;
  • 35. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: Performance Schema •Instrumentação ampliada de statements –Stored Procedures e Stored Functions –Prepared Statements –Transações Instrumentação de Statements •Instrumentos para Memória –Adicionados mais de 200 Memory Types •Agregação de estatísticas –Tipo de memória (cache, interna buffer, …) –Thread/usuário/host gerando operações indiretas na memória •Atributos incluem –Memória usada (bytes), Operações (counts), máximo/mínimo histórico Uso da Memória Métricas e instrumentações adicionais –Status dos Slaves –MDL lock Outros Dados adicionais
  • 36. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | •Desenvolvimento guiado pelo feedback positivo no ps_helper –Mais de 80 views, versionadas, auto-atualizáveis e de acordo com a versão do server –Suporta MySQL 5.5, 5.6, and 5.7 •SYS é similar a: –Oracle V$ catalog views –Microsoft SQL Server DMVs (Dynamic Management Views) –IBM DB2 SYSIBM catalog •Disponível no Workbench 6.1+ ou via GitHub –Workbench inclui “one click” reports MySQL SYS Schema Views simplificadas na Performance Schema & Information Schema
  • 37. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
  • 38. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL 5.7.4: Replication •Maior throughput –Slave: aplica transações em paralelo, mesmo pertencentes ao mesmo database/schema –Master: melhor sincronização entre sessões dos usuários de replicaçãobetter synchronization between replication-user sessions •DMR4 melhora performance no master para Semi-synchronous Replication •Replicação sem perda com Semi-sync •Diagnóstico e monitoramento dos slaves via Performance Schema •Filtros dinâmicos de replicação: mude filtros sem reiniciar o servidor Melhor Performance, Usabilidade e Disponibilidade
  • 39. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Multi-Threaded Slave •A evolução… –2010: Inter-schema MTS (labs) –2013: Inter-schema MTS (5.6 GA) –2013: Intra-schema MTS (5.7.2 DMR) –Hoje: tamanho configurável de group commit buckets – balanço de latência de commits no master (labs) •Ganho de 6X throughput no slave Slave no mesmo passo que o Master 0 500 1000 1500 2000 2500 3000 3500 4000 4500 0 4 8 12 16 22 24 28 32 36 40 44 48 Transacons per second Slave Worker Threads Slave Throughput Larger BGC bucket No Master Impact Baseline
  • 40. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Multi-Source Replication •Consolida updates de múltiplos Masters em um Slave –Visão consolidada –Novas topologias –Ponto centralizado de backup –Relatórios mais fáceis •Compatível com Semi-Synchronous Replication & Multi-Thread Slaves •Master-specific slave filters •Aplicação continua responsável por manter data sets não-conflitantes entre as diversas fontes Binlog Master 1 Binlog Master 2 … … Binlog Master N IO 1 Relay 1 Coordinator W1 W2 … WX IO 2 Relay 2 Coordinator W1 W2 … WX … … Coordinator W1 W2 … WX IO N Relay N Coordinator W1 W2 … WX Slave
  • 41. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL 5.7: InnoDB •Online Alter Table melhorado –Renomear índice online, mudar varchar, “optimize” •Melhor integração com FusionIO –Quando DirectFS for detectado, Doublewrite buffer desabilitado automaticamente –“Dirty Page” Flushing paralelizado –Maior throughput, performance e escalabilidade •Partições – suporte ao recurso Transportable Tablespaces (TTS) –TTS para partições individuais Diversas Melhorias
  • 42. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL GIS •InnoDB Spatial Index –Suporte a índices R-tree otimizados •Integração com Boost.Geometry –Melhor precisão –Suporte a tipos e funções adicionais –Performance melhorada –Open Geospatial Consortium compliance –Colaboração com melhorias no Boost.Geometry
  • 43. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Saiba mais... Detalhes sobre “O que há de novo no MySQL 5.7 (até agora) •[blog post] http://www.alastori.com.br/2014/11/o- que-ha-de-novo-no-mysql-5.html
  • 44. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Workbench 6.2 GA, pronto para produção Oracle Confidential – Internal/Restricted/Highly Restricted 45
  • 45. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Workbench 6.1 •Performance Dashboard –Veja a performance do servidor com estatísticas e gráficos em tempo real –“SYS” Schema: Performance Schema Reports •Visual Explain 2.0 –Nova saída gráfica melhorada, com layout mais simples e limpo •Suporte ao Enterprise Backup melhorado –Configuração automática para backups já existentes –Gerenciamento melhorado para contas de backup novas e já existentes
  • 46. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Workbench 6.1 Dashboards: Performance & Status Analyze hotspots, costly SQL statements, wait times, locks, InnoDB stats, and more Network, Server, InnoDB
  • 47. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
  • 48. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
  • 49. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 50
  • 50. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Workbench 6.2 •A new spatial data viewer, allowing graphical views of result sets containing GEOMETRY data and taking advantage of the new GIS capabilities in MySQL 5.7. •Support for new MySQL 5.7.4 SQL syntax and configuration options. •Metadata Locks View shows the locks connections are blocked or waiting on. •MySQL Fabric cluster connectivity – Browsing, view status, and connect to any MySQL instance in a Fabric Cluster. •MS Access migration Wizard – easily move to MySQL Databases. •Other significant usability improvements were made, aiming to raise productivity for advanced and new users: –Direct shortcut buttons to commonly used features in the schema tree. –Improved results handling. Columns have better auto-sizing and their widths are saved. Fonts can also be customized. Results “pinned” to persist viewing data. –A convenient Run SQL Script command to directly execute SQL scripts, without loading them first. –Database Modeling has been updated to allow changes to the formatting of note objects and attached SQL scripts can now be included in forward engineering and synchronization scripts. –Integrated Visual Explain within the result set panel. –Visual Explain drill down for large to very large explain plans. –Shared SQL snippets in the SQL Editor, allowing multiple users to share SQL code by storing it within a MySQL instance. •And much more… Oracle Confidential – Internal/Restricted/Highly Restricted 51
  • 51. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Utilities & Fabric 1.5 GA, pronto para produção Oracle Confidential – Internal/Restricted/Highly Restricted 52
  • 52. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Utilities 1.5 •Automatiza tarefas comuns de DevOps –Replication: provisionamento, teste, monitoramento e failover –Comparação de Databases: verificação de consistência –Manutenção: users, connections, tables –Auditoria •Scripts em Python –Pacote standalone ou via MySQL Workbench –Extensíveis para incluir scripts customizados (usa Python library) •Novo: Cloud integration: Openstack Nova, “Server providers” https://oracleus.activeevents.com/2014/connect/fileDownload/session/CF4F217F7E733EF6066ED14D5CB7371C/CON5636_Kindahl- MySQLFabricElasticityOOW2014.pdf Útil para DevOps e gerenciamento automatizado do MySQL
  • 53. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | HA group MySQL Fabric 1.5 (MySQL Utilities) •Alta disponibilidade: –Monitoramento do Server com failover automático e transparente para aplicação •Sem Proxy, sem latência extra e SPoF Alta-disponibilidade + escalabilidade de escrita com sharding Connector Application SQL Read-slaves Read-slaves HA group MySQL Fabric •Escalabilidade de escrita com sharding: –Aplicação define a shard key (Range ou Hash) –Ferramentas para re-sharding –Tabelas globais & global updates •Conectores devem ser “Fabric-aware”: –Java, PHP, Python
  • 54. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Cluster 7.4 Beta, disponível para download e testes Oracle Confidential – Internal/Restricted/Highly Restricted 55
  • 55. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Cluster Data Nodes NDB NDB Connection Pool, SQL Interface, Parser, Optimizer, Caches Enterprise Management Services and Utilities Backup & Recovery Monitor Workbench Utilities Clients & Connectors Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl Storage Engines InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc… Filesystems, Files & Logs Data, Index, Logs… mysqld Clients and Apps ndbd mgm_ndbd Management Arquitetura MySQL Cluster
  • 56. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Cluster 7.4 • Ganho de Performance sobre v7.3 – 47% (Read-Only) – 38% (Read-Write) Melhor performance e simplicidade operacional  Restarts mais rápidos dos nós – Recovering nodes rejoin the cluster faster
  • 57. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Soluções de HA homologadas pela Oracle MySQL Replication MySQL Fabric Oracle VM Template Oracle Clusterware Solaris Cluster Windows Cluster DRBD MySQL Cluster App Auto-Failover ✖ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Data Layer Auto-Failover ✖ ✔ ✔ ✔ ✔ ✔ ✔ ✔ Zero Data Loss MySQL 5.7 MySQL 5.7 ✔ ✔ ✔ ✔ ✔ ✔ Platform Support All All Linux Linux Solaris Windows Linux All Clustering Mode Master + Slaves Master + Slaves Active/Passive Active/Passive Active/Passive Active/Passive Active/Passive Multi- Master Failover Time N/A Secs Secs + Secs + Secs + Secs + Secs + < 1 Sec Scale-out Reads ✔ ✖ ✖ ✖ ✖ ✖ ✔ Cross-shard operations N/A ✖ N/A N/A N/A N/A N/A ✔ Transparent routing ✖ For HA ✔ ✔ ✔ ✔ ✔ ✔ Shared Nothing ✔ ✔ ✖ ✖ ✖ ✖ ✔ ✔ Storage Engine InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ InnoDB+ NDB Single Vendor Support ✔ ✔ ✔ ✔ ✔ ✖ ✔ ✔
  • 58. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Backup 3.11 GA, pronto para produção Oracle Confidential – Internal/Restricted/Highly Restricted 59
  • 59. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Backup 3.11 •Backup na Nuvem: Amazon S3 •Backup otimista: muito melhor para backups grandes com pouca variação •Full Instance Backup: clone com mais facilidade, ideal para replicação •Novas opções de compressão •Mais seguro: Advanced Encryption Standard (AES) –Compressão e/ou aplicação de seguranção em 1 único passo •Restore parcial online •Sem área de staging para backup e restore Velocidade, compressão, flexibilidade, eficiência e segurança
  • 60. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Monitor 3.0 GA, pronto para produção Oracle Confidential – Internal/Restricted/Highly Restricted 61
  • 61. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Monitor 3.0 •Monitoramento em tempo real da performance e disponibilidade •Encontre e corrija problemas visualmente •Monitore discos e faça capacity planning •Comece a monitorar em 10 minutos •Arquitetura que não exige agentes •Agente remoto monitora SO
  • 62. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 63
  • 63. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Commercial Extensions Plug-ins disponíveis na Edição Enterprise Oracle Confidential – Internal/Restricted/Highly Restricted 64
  • 64. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Scalability •Thread Pool Plugin •Escalabilidade vertical para múltiplas conexões simultâneas •Mais de 60x escalabilidade de leitura e escrita MySQL Enterprise Secutiry •External Authentication Plugins •Delega autenticação para diretório de usuários, como AD, LDAP •Linux e Windows Oracle Confidential – Internal/Restricted/Highly Restricted 65 MySQL Enterprise Audit •Implementa logs de auditoria com um único comando de instalação •Flexibilidade na configuração •Aderente às principais normas de regulação MySQL Enterprise Encryption •Funções do OpenSSL via SQL •Gerenciamento de Certificados •Criptografia Assimétrica Plugins Comerciais
  • 65. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL Enterprise Edition Contatos comerciais Marcos Trujillo Enterprise Sales, Oracle marcos.trujillo@oracle.com Alison Rabelo OEM/ISV Sales, Oracle alison.rabelo@oracle.com
  • 66. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | MySQL for Beginners Ed 3 MySQL for Database Administrators Ed 3.1 MySQL Performance Tuning MySQL High Availability MySQL Cluster MySQL DBA Introduction to MySQL 5.5 MySQL Developers Techniques MySQL for Beginners Ed 3 MySQL and PHP Developing Dynamic Web Applications MySQL for Developers Ed 2 MySQL Advanced Stored Procedures MySQLDeveloper education.oracle.com/mysql Opcional Necessário Treinamentos e certificações Oracle Certified Professional, MySQL 5.6 DBA Oracle Certified Expert, MySQL Cluster DBA Certificações Oracle Certified Professional, MySQL 5.6 Developer
  • 67. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | @MySQLBR meetup.com/MySQL-BR facebook.com/MySQLBR pt.planet.mysql.com
  • 68. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Sumário •A Oracle aumenta o nível do MySQL entregando para a comunidade com mais velocidade e qualidade: –GA: MySQL Cluster 7.3, MySQL Workbench 6.2, MySQL Utilities, MySQL Fabric e muito mais! –DMRs & Labs: MySQL 5.7, Multi-source Replication, GIS, MySQL Cluster 7.4... •A Oracle investe no MySQL como solução para Aplicações Web, Cloud e Big Data (distribuídas) da próxima geração. •Teste as novidades e nos dê Feedback!