Contenu connexe Similaire à Novidades do MySQL para desenvolvedores ago15 (20) Plus de MySQL Brasil (14) Novidades do MySQL para desenvolvedores ago152. Copyright © 2015 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 © 2015 Oracle and/or its affiliates. All rights reserved. |
DBA ou SysAdmin Desenvolvedor
Oracle Confidential – Internal/Restricted/Highly Restricted 3
Gerencial
Quem?
4. Copyright © 2015 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
5. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Oracle elevando o nível
Um MySQL cada vez melhor, 5 anos de investimento
2x Engineering Staff
3x QA Staff
2x Support Staff
6. Copyright © 2015 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, prontos para !
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.4
MySQL Enterprise Monitor 3.0
MySQL Enterprise Backup 3.12
MySQL Fabric
MySQL Workbench 6.3
MySQL Enterprise Encryption
Todos GA!
Disponível agora!
Breve histórico: 2010 - 2015
MySQL Database 5.7 RC
labs.mysql.com
7. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL: evolução com foco nas necessidades dos usuários
9
Web, Cloud, Distribuído e Embarcado…
8. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Evolução da arquitetura do MySQL
• Mais Modularidade
– Refactoring do código, plug-ins
• Performance & Escalabilidade
– Novo Modelo de Custo do Optimizer
– Melhorias no InnoDB & Replicação
• Gerenciamento & Segurança
– Operações Online
– Data Dictionary, Performance Schema
– MySQL Enterprise
10
Foco em Web, Cloud, Distribuído, Embarcado
9. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Database
Rápida retrospectiva
10. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Qual versão do MySQL Database você usa?
SELECT @@version;
+---------------------------------------+
| @@version |
+---------------------------------------+
| 5.6.25-enterprise-commercial-advanced |
+---------------------------------------+
1 row in set (0,00 sec)
11. Copyright © 2015 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 © 2015 Oracle and/or its affiliates. All rights reserved. |
Atualize!
MySQL 5.6 e InnoDB
Oracle Confidential – Internal/Restricted/Highly Restricted 15
13. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
No Windows: MySQL Installer
Next, Next... Finish!
dev.mysql.com/downloads/windows/installer
14. Copyright © 2015 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
15. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
…ou manualmente via binários pré-compilados
16. Copyright © 2015 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
17. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Database 5.7 RC2
Disponível para download e testes, ainda não recomendado para produção
Oracle Confidential – Internal/Restricted/Highly Restricted 20
18. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 Release Candidate
21
InnoDB continua melhorando:
operações online & performance
Novidades na Replicação: multi-
source, multi-threaded slaves...
Otimizador: melhores planos de
execução com novo Modelo de Custo
Mais info no Performance Schema
MySQL SYS Schema nativo
Performance & Escalabilidade Gerenciamento & Segurança
2x mais rápido que MySQL 5.6
Mais segurança na inicialização, setup
e gerenciamento
MySQL Enterprise Firewall
RC2
mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available
19. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 Release Candidate
22
InnoDB continua melhorando:
operações online & performance
Novidades na Replicação: multi-
source, multi-threaded slaves...
Otimizador: melhores planos de
execução com novo Modelo de Custo
Mais info no Performance Schema
MySQL SYS Schema nativo
Performance & Escalabilidade Gerenciamento & Segurança
2x mais rápido que MySQL 5.6
Mais segurança na inicialização, setup
e gerenciamento
MySQL Enterprise Firewall
RC2
mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available
20. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
0
100,000
200,000
300,000
400,000
500,000
600,000
700,000
8 16 32 64 128 256 512 1,024
QueriesperSecond
Connections
MySQL 5.7: Sysbench Read Only (Point Select)
MySQL 5.7
MySQL 5.6
MySQL 5.5
MySQL 5.7: Sysbench Read Only Point Select
Intel(R) Xeon(R) CPU E7-4860 x86_64
4 sockets x 10 cores-HT (80 CPU threads)
2.3 GHz, 512 GB RAM
Oracle Linux 6.5
2x mais rápido que MySQL 5.6
3x mais rápido que MySQL 5.5
645,000 QPS
23
21. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Conexões por Segundo
1.7x mais rápido que MySQL 5.6
2.5x mais rápido que MySQL 5.5
67,000 Conexões/Sec
0
10,000
20,000
30,000
40,000
50,000
60,000
70,000
80,000
MySQL 5.5 MySQL 5.6 MySQL 5.7
Connections/Second
Connections Per Second
MySQL 5.5
MySQL 5.6
MySQL 5.7
24
Intel(R) Xeon(R) CPU E7-4860 x86_64
4 sockets x 10 cores-HT (80 CPU threads)
2.3 GHz, 512 GB RAM
Oracle Linux 6.5
22. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Artigo no iMasters por Marcelo Altmann
http://imasters.com.br/banco-de-dados/mysql-e-nosql-memcached-plugin/
Ondemand Webinar:
NoSQL Memcached API for MySQL Cluster
22 August 2012
mysql.com/news-and-events/on-demand-webinars/display-od-723.html
Slides:
https://www.mysql.com/why-mysql/presentations/mysql-cluster-nosql-memcached-api
Exemplos Memcached API
23. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB, NoSQL com Memcached
6x mais rápido que MySQL 5.6
Contribuição do Facebook
0
200,000
400,000
600,000
800,000
1,000,000
1,200,000
8 16 32 64 128 256 512 1,024
QueriesperSecond
Connections
MySQL 5.7 vs 5.6 - InnoDB & Memcached
MySQL 5.7
MySQL 5.6
1 Milhão de QPS
26
Intel(R) Xeon(R) CPU E7-4860 x86_64
4 sockets x 10 cores-HT (80 CPU threads)
2.3 GHz, 512 GB RAM
Oracle Linux 6.5
24. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Generated Columns
mysql> CREATE TABLE t (a INT, b INT, c INT GENERATED ALWAYS AS(a+b),
PRIMARY KEY(a));
mysql> INSERT INTO t VALUES (11, 3, default);
mysql> SELECT * FROM t;
+----+------+------+
| a | b | c |
+----+------+------+
| 11 | 3 | 14 |
+----+------+------+
27
RC2
Generated Columns são calculadas com
base em uma função que pode referenciar
outras colunas.
25. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Virtual Generated Columns
mysql> ALTER TABLE t ADD new_col INT GENERATED ALWAYS AS (a - b) VIRTUAL;
mysql> SELECT * FROM t;
+----+------+------+---------+
| a | b | c | new_col |
+----+------+------+---------+
| 11 | 3 | 14 | 8 |
+----+------+------+---------+
28
RC2
Colunas virtuais são calculadas on-the-fly
e não ocupam espaço de armazenamento
e podem ser adicionadas ou removidas
sem rebuild da tabela.
26. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Virtual Columns
mysql> UPDATE t SET a = 20;
mysql> SELECT * FROM t;
+----+------+------+---------+
| a | b | c | new_col |
+----+------+------+---------+
| 20 | 3 | 23 | 17 |
+----+------+------+---------+
29
RC2
Os valores das colunas virtuais serão
sempre recalculados automaticamente.
Este recurso pode ser útil para substituir
tabelas sumarizadas ou CHECKs de
consistência.
27. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Virtual Columns
mysql> CREATE INDEX idx ON t(c);
mysql> EXPLAIN SELECT c FROM t;
+-----+-------+-------+------+---------+------+------+----------+-------------+
| ... | table | type | key | key_len | ref | rows | filtered | Extra |
+-----+-------+-------+------+---------+------+------+----------+-------------+
| ... | t | index | idx | 5 | NULL | 1 | 100.00 | Using index |
+-----+-------+-------+------+---------+------+------+----------+-------------+
30
RC2
Podem ser contruídos índices secundários
em colunas virtuais (functional indexes).
Como os índices serão persistidos e
atualizados normalmente, esta é uma
forma de “materializar” colunas virtuais.
28. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Limitações de Virtual Columns
Na versão atual, há algumas limitações que serão endereçadas futuramente:
• Primary Keys não podem conter virtual columns
• Foreign Keys também não podem conter virtual columns
• Não é permitido criar um índice que combinam colunas virtuais com
normais
• Índices do tipo fulltext ou spatial ainda não são suportados (roadmap)
31
RC2
29. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: JSON
• Native JSON data types
– Native internal binary format for efficient processing & storage
• Built-in JSON functions
– Allowing you to efficiently store, search, update, and manipulate Documents
• JSON Comparator
– Allows for easy integration of Document data within your SQL queries
• Indexing of Documents using Virtual Columns
– InnoDB supports indexes on both stored and virtual Generated Columns
– New expression analyzer automatically uses the best “functional” index available
32
RC2
30. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Exemplo JSON
mysql> create table employees(id bigint not null primary key
auto_increment, info JSON);
mysql> insert into employees (info) values ('{ "name": "Matt Lord",
"age": 38, "Duties": { "Product Manager": ["stuff", "more stuff"]} }');
mysql> select json_valid(info) from employees; --RETORNA 1 (true)
mysql> select id, json_extract(info, '$.name') from employees;
+----+-----------------------------+
| id | jsn_extract(info, '$.name') |
+----+-----------------------------+
| 1 | "Matt Lord" |
+----+-----------------------------+
33
RC2
31. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Virtual Columns + JSON
mysql> alter table employees add name varchar(100) generated always as
(json_extract(info, '$.name')) virtual;
mysql> select id, name from employees where name = '"Matt Lord"';
+----+-------------+
| id | name |
+----+-------------+
| 1 | "Matt Lord" |
+----+-------------+
34
RC2
Podemos criar uma coluna virtual com
dados extraídos do JSON.
32. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Virtual Columns + JSON
mysql> alter table employees add index (name);
mysql> explain select id, name from employees where name = '"Matt Lord"';
+-----+-----------+------+------+---------+-------+------+----------+-------------+
| ... | table | type | key | key_len | ref | rows | filtered | Extra |
+-----+-----------+------+------+---------+-------+------+----------+-------------+
| ... | employees | ref | name | 103 | const | 1 | 100.00 | Using index |
+-----+-----------+------+------+---------+-------+------+----------+-------------+
Exemplo completo:
http://mysqlserverteam.com/tag/virtual-column
35
RC2
Os índices vão tornar as operações de
leitura na tabela extremamente rápidas.
33. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB
• Sempre Online
– InnoDB Buffer Pool dinâmico, UNDO tablespace separado e auto-truncation,
renomear índice, mudar varchar, mais variáveis de config. dinâmicas
• Melhorias para SSD (especialmente FusionIO)
– Quando DirectFS for detectado, Doublewrite buffer desabilitado automaticamente
– “Dirty Page” Flushing paralelizado
– Maior throughput, performance e escalabilidade
• Particionamento nativo na camada de Storage Engines
– Elimina limitações anteriores, melhora utilização de recursos, TTS para partições
individuais
Diversas Melhorias
34. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB
• Melhorias de performance
– bulk load (importação de dados) e criação de índices mais rápidos
– buffer pool dump/load por default e cache preloading
– temp tables no InnoDB
• General Tablespaces
– Múltiplas tabelas armazenadas em tablespaces definidos pelo usuário
• Compressão transparente e configurável no nível de páginas
• High priority transactions com suporte para MySQL Group Replication
Diversas Melhorias
35. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Aplicação
Replicação MySQL
Master Slave
Escritas & Leituras Leituras
Exemplos de uso:
dividir carga OLTP e OLAP
backup
contingência
distribuição geográfica
etc.
36. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Replicação
• Maior throughput 8-10x
– Gargalo eliminado com 8 threads paralelas
• Replicação sem perda Semi-sync
– Melhor performance no master para Semi-
synchronous Replication
• Diagnóstico e monitoramento via
Performance Schema
• Mais operações online
– GTID deploy
– Filtros dinâmicos de replicação
Melhor Performance, Usabilidade e Disponibilidade
0%
50%
100%
150%
200%
250%
1 8 24 48
Slave Threads
Slave throughput vs. 96 Thread Master
37. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: 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
• Operações online
– master switch
– filtros dinâmicos por Master
– monitoriamento via Performance Schema
• Aplicação continua responsável por
manter data sets não-conflitantes entre
as diversas fontes
• Compatível com Semi-Synchronous
Replication & Multi-Thread Slaves
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
38. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 Parser & Optimizer Refactoring
Abre caminho para melhorias mais
rápidas com maior estabilidade e menor
risco
– Modularização e separação em camadas
– Definição clara do que acontece nos estágios
de parsing, otimização e execução
Novo hint framework
– Sintaxe padronizada /*+ */
– Suporte a novos hints
Optimizer
Logical transformations
Cost-based optimizer:
Join order and access methods
Plan refinement
Query execution
plan
Query execution
Parser
Resolver:
Semantic check,name resolution
SQL DML query
Query result
Storage Engine
InnoDB MyISAM
39. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Optimizer - EXPLAIN expandido e visual
42
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "200.40"
},
"table": {
"table_name": "nicer_but_slower_film_list",
"access_type": "ALL",
"rows_examined_per_scan": 992,
"rows_produced_per_join": 992,
"filtered": 100,
"cost_info": {
"read_cost": "2.00",
"eval_cost": "198.40",
"prefix_cost": "200.40",
"data_read_per_join": "852K"
},
"used_columns": [
"FID",
"title",
"description",
"category",
"price",
"length",
"rating",
"actors"
], ...
40. Copyright © 2015 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>;
41. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Query Rewrite Plugin
• Usuários podem controlar o que ocorre antes e depois do parse da query
• Muitos casos de uso
– Reescrita de uma query problemática sem alterar a aplicação
– Melhorar queries vindas de um ORM ou aplicações de terceiros
– Migrações de outros SGBDs
– Modificar ordem dos joins, adicionar hints , etc.
• Elimina necessidade de proxies em muitos casos
mysqlserverteam.com/the-query-rewrite-plugins
42. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Novo Modelo de Custo do Otimizador
• Mais performance com estimativas mais precisas
• Adaptável aos novos hardwares
– SSD, memória abundante, mais caches
• Configurável e “tunável”
– Tabelas mysql.server_cost & mysql.engine_cost
– Meta-info de onde dado reside (disco ou in cache) acessível via API
• Implementação mais fácil de manter
– Evita hard coded “cost constants”
– Refactoring de heurísticas existentes no modelo atual
45
43. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Optimizer Cost Model: Performance Improvements
DBT-3 (Size Factor 10, CPU bound)
0
20
40
60
80
100
Q3 Q7 Q8 Q9 Q12
Executiontimerelativeto5.6(%)
5 out of 22 queries get a much improved query plan (others remain the same)
MySQL 5.6
MySQL 5.7
44. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
0
20
40
60
80
100
Q2 Q18
Executiontimerelativeto5.6(%)
CPU bound
5.6
5.7
Optimizer Cost Model: Performance Improvements
DBT-3 (Size Factor 10)
2 out of 22 queries get a significantly improved query plan (others remain the same)
0
20
40
60
80
100
Q2 Q18
Executiontimerelativeto5.6(%)
Disk bound
5.6
5.7
45. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 Release Candidate
49
InnoDB continua melhorando:
operações online & performance
Novidades na Replicação: multi-
source, multi-threaded slaves...
Otimizador: melhores planos de
execução com novo Modelo de Custo
Mais info no Performance Schema
MySQL SYS Schema nativo
Performance & Escalabilidade Gerenciamento & Segurança
2x mais rápido que MySQL 5.6
Mais segurança na inicialização, setup
e gerenciamento
MySQL Enterprise Firewall
RC
mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available
46. Copyright © 2015 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
– Detalhamento de Threads por usuário
Outros Dados adicionais
47. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
• SYS é similar a:
– Oracle V$ catalog views
– Microsoft SQL Server DMVs (Dynamic Management Views)
– IBM DB2 SYSIBM catalog
• Mais de 80 views auto-atualizáveis, agora nativas na versão 5.7
– Ajuda encontrar e diagnosticar diagnosticar problemas de performance
– Monitoramento da saude do server com estatísticas
– Inclui schemas, tabelas e índices, IO hot spots, Locking, Queries lentas…
• Disponível também no Workbench 6.1+ ou via GitHub para 5.5 e 5.6
MySQL SYS Schema
Views simplificadas na Performance Schema & Information Schema
49. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Segurança
• AES 256 Encryption e SSL habilitado por default
– usa certificados existentes ou gera automaticamente caso necessário
– novo utilitátio: mysql_ssl_rsa_setup
• Definição de roles através para todos plugins de autenticação (proxy user)
• Políticas de expiração de senhas globais ou por usuário
• Facilidade na inicialização segura do servidor
– mysqld --initialize
• Instalação segura por padrão
– Senha aleatória na instalação
– Sem conta anônima, schemas de testes
• Suporte nativo ao systemd com detecção automática e envio de logs ao syslog
53
50. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Edition
Suporte + Backup + Monitor + Workbench + Plug-ins
Escalabilidade
Segurança
Firewall
Auditoria
Criptografia
Oracle Enterprise Manager
for MySQL
51. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Secutiry
• External Authentication Plugins
• Delega autenticação para diretório de usuários,
como AD, LDAP
• Linux e Windows
MySQL Enterprise Firewall
• Bloqueio online de ameaças
• Transparente para Aplicação
• Alertas & Logs
Oracle Confidential – Internal/Restricted/Highly Restricted 55
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 para Segurança
52. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
• Construção automática de
Whitelists
• Bloqueio online de ameaças
• Alertas & Logs
• Transparente para Aplicação
• Alta performance & Escalável
Enterprise Firewall
Select *.* from employee where id=22
Select *.* from employee where id=22 or 1=1
Block & Log✖
Allow & Log✔
White ListApplications
53. Copyright © 2015 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
• GeoHash e GeoJSON
• Novas funções como ST_Distance_Sphere() e ST_MakeEnvelope()
54. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
• R-tree based
– Full transactional support
– Predicate locking to prevent phantoms
– Records contain minimum bounding box
• Small and compact
– Currently only supports 2D data
• We would like to add 3D support in the future
– Supports historical spatial index DDL syntax
MySQL 5.7: GIS - InnoDB Spatial Indexes
62
55. Copyright © 2015 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 e Solaris, removida opção USER
Contribuição do Davi Arnaut, nosso colega brasileiro no LinkedIn
SELECT MAX_STATEMENT_TIME = 109 * FROM my_table;
56. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Download: MySQL 5.7
Release Candidate disponível para testes
dev.mysql.com/downloads/mysql
57. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Instalação MySQL 5.7 no Linux via YUM
mkdir -p /opt/mysql/packages
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum -y localinstall mysql-community-release-el7-5.noarch.rpm
yum-config-manager --disable mysql56-community
yum-config-manager --enable mysql57-community-dmr
yum repolist enabled | grep mysql
yum --nogpgcheck install mysql-community-server
(development milestone
release) enquanto não existir
versão pronta para produção
Neste exemplo, rpm do repositório é para para OL / RHEL 7.
Para outras versões/distros baixe no mysql.com.
58. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Pós-instalação MySQL 5.7 no Linux
service mysqld start
cat /var/log/mysqld.log
service mysqld status
cat /var/log/mysqld.log | grep "A temporary password is generated for
root@localhost: “
mysqladmin -uroot -p password 'Root#123'
mysql -uroot -pRoot#123
59. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Participe com seu Feedback
bugs.mysql.com
60. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Código-fonte no GitHub
bugs.mysql.com
61. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Utilities & Fabric 1.5
Oracle Confidential – Internal/Restricted/Highly Restricted 70
62. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Utilities
• 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: Integração 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
63. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric
• Alta disponibilidade:
– Monitoramento do Server com failover
automático e transparente para aplicação
• Provisionamento usando OpenStack
• Conectores devem ser “Fabric-aware”:
– Java, Python, .NET, C, PHP (alguns alfa)
– Sem Proxy, sem latência extra e SPoF
Gerencie farms MySQL com suporte a HA e Sharding
• (Opcional) Escalabilidade de escrita
com sharding
MySQL Fabric
Connector
Application
Read-slaves
SQL
HA group
Read-slaves
HA group
Connector
Application
64. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Whitepaper:
MySQL Fabric
September 2014
mysql.com/why-mysql/white-papers
Tutorial disponível no white paper
65. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL no Docker
Introdução ao conceito de MySQL rodando em Linux Containers
• [blog post]
http://www.alastori.com.br/2015/03/mys
ql-no-docker.html
66. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster 7.4
Oracle Confidential – Internal/Restricted/Highly Restricted 76
67. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster 7.4 GA
• 200 Million NoSQL
Reads/Sec
• 2.5M SQL Ops/Sec
• 50% Faster Reads
• 40% Faster Mixed
Performance
• Active-Active
Geographic
Redundancy
• Conflict
Detection/Resolution
Active-Active
• 5X Faster
Maintenance Ops
• Detailed Reporting
Management
Copyright 2015, oracle and/or its affiliates. All rights reserved 78
68. Copyright © 2015 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
• Operações de manutenção mais
rápidas
– Reinicializações e Upgrades
GA
69. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster: Active-Active Geo-Replication
• Asynchronous replication between MySQL Clusters
• Active-Active
– Update anywhere
– Conflict detection
• Application notified through exception tables
• Can opt to have conflicts resolved automatically
– Auto-conflict-resolution
• Conflicting transaction and dependent ones are rolled-back
• No required changes to app schema
80
70. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Workbench 6.3
Oracle Confidential – Internal/Restricted/Highly Restricted 81
71. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Workbench 6.3
• Fabric
– Add node, browse, view, connect
• Performance Dashboard
– Performance Schema Reports & Graphs
• Visual Explain
• GIS Viewer
• Migration
– New: Microsoft Access
– Microsoft SQL Server, Sybase,
PostgreSQL, SQLite
GA
82
• New Easy to Use Wizards for
– Fast Data Migration
– Table<->File Data Import/Export (like Excel)
– SSL Certificate Creation
72. Copyright © 2015 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
75. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 88
76. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
O que vem por aí…
Oracle Confidential – Internal/Restricted/Highly Restricted 89
77. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Labs
Builds especiais para testes da comunidade
dev.mysql.com/downloads/mysql
78. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
• Multi-master update anywhere
– Conflict detection and resolution (transaction rollback)
– Optimistic State Machine Replication
• Automatic group membership
management and failure detection
– No need for server fail-over
– Elastic scale out/in
– No single point of failure
– Automatic reconfiguration
• Well integrated
– InnoDB
– GTID-based replication
– PERFORMANCE_SCHEMA
Group Replication
Application
MySQL Masters Replication
Plugin
API
MySQL
Server
Group Comms
labs.mysql.com
79. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
HTTP Plugin for MySQL
• Server Plugin adds HTTP(S) endpoints to MySQL
• Results are serialized to JSON format encoded as UTF8
• Provides 3 choices of User Endpoint Types
– SQL
– CRUD - Key-Value
– JSON - Document
labs.mysql.com
80. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
MySQL Hadoop Applier
Integração em tempo real do
MySQL para Hadoop
Cada tabela mapeada para
um diretório Hive data
warehouse
Possibilita usufruir de
ferramentas de análise do
eco-sistema Hadoop
Construído sobre MySQL
Binlog API e libhdfs library
Artigos dev.mysql.com
Download labs.mysql.com
81. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Sumário
• Há muito investimento da Oracle no MySQL com foco em Aplicações
Web e Embarcadas.
• A edição Community ganha mais velocidade e qualidade.
• O MySQL Enterprise Edition aumenta a disponibilidade, o
desempenho e a segurança através de ferramentas, extensões
comerciais e suporte.
82. Copyright © 2015 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
Mais conhecimento para a equipe
Oracle Certified
Professional, MySQL 5.6
DBA
Certificações
Oracle Certified
Professional, MySQL 5.6
Developer
83. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 99
84. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
@MySQLBR meetup.com/MySQL-BRfacebook.com/MySQLBR
pt.planet.mysql.com
85. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Obrigado!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
87. Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |
Perguntas?
Novidades do Universo MySQL
Contato:
airton.lastori@oracle.com
twitter.com/mysqlbr
facebook.com/mysqlbr
88. Copyright © 2015 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