novidades sanindusa · novidades sanindusa.pdf Author: Nadia Created Date: 9/17/2014 11:48:35 AM ...
Novidades do Universo MySQL Agosto 2014
-
Upload
mysql-brasil -
Category
Technology
-
view
438 -
download
1
description
Transcript of Novidades do Universo MySQL Agosto 2014
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Novidades do universo MySQL
Agosto 2014 Airton Lastori [email protected]
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. |
Tomas Ulin no Percona Live 2014
• [video] youtube.com/watch?v=8stNlpJm_nA
• [slides] mysql.com/why-mysql/presentations/raising-the-mysql-bar
VP de Engenharia do MySQL na Oracle
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Elevando o nível Novamente, um melhor MySQL para vocês
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
COMPONENTES da pilha
MySQL: Aplicações Web da próxima geração On-Premises, na Nuvem, Aplicações Distribuídas
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Fonte: http://db-engines.com/en/ranking_trend (agosto/14)
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 VM Template for MySQL
Oracle Products Certifications
MySQL Windows Installer
MySQL Enterprise Security
MySQL Enterprise Scalability
MySQL Cluster 7.2
MySQL Cluster Manager 1.3
MySQL Utilities 1.0.6
MySQL Workbench 6.0
Todos GA!
MySQL Enterprise Backup 3.10
MySQL Enterprise Audit
MySQL Windows Tools
MySQL Database 5.6
MySQL Cluster 7.3
MySQL Workbench 6.1
MySQL Fabric 1.4
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 Database 5.7 Disponível para download e testes, ainda não recomendado para produção
Oracle Confidential – Internal/Restricted/Highly Restricted 11
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
Arquitetura MySQL Database
Storage Engines InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc…
Filesystems, Files & Logs Data, Index, Logs…
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. |
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. |
Repositórios YUM e APT para MySQL
• Maneira simples e conveniente de instalar e atualizar produtos 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
Benefícios para Usuários Finais e Distribuições Linux
Também disponível via NuGet para desenvolvedores .NET
Mais de 50% dos
downloads para
Fedora/RedHat já são
feitos do repositório
nuget.org/profiles/MySQL
www.alastori.com.br/2014/05/tutorial-de-instalacao-do-mysql-56-e.html
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: Refactoring no Parser
• Melhora confiabilidade, manutenção e estabilidade
– Separa claramente os papéis de parsing, otimização e execução
– Permite adição de funcionalidades mais facilmente, com menor risco
• Transforma o SQL Parser em num verdadeiro bottom-up parser
– Melhor suporte para regras de sintaxe maiores
– Menos nós intermediários na árvore de parse • Menor alocação
• Gramática mais rápida
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. |
MySQL SYS Schema
• Ajuda a simplificar tarefas do DBA
– Monitora a saúde, taxas de crescimento entre outras métricas chave
– Encontre problemas de performance, faça o diagnóstico e aplique o tuning
• Mostra informações fáceis de entender acerca de: – Regiões quentes de IO
– SQL statements mais custosos
– Tabelas, índices e estatísticas
– Análise de wait time
– Locking
– Estatísticas do InnoDB
Views simplificadas na Performance Schema & Information Schema
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
MySQL SYS Schema
• 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
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
Transaconspersecond
SlaveWorkerThreads
SlaveThroughput
LargerBGCbucket
NoMasterImpact
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 5.7: InnoDB Compression
• Compressão transparente no nível de página
– Ocorre transparentemente nas threads em background
– Gerenciado completamente na camada de IO
– Usa arquivos esparsos e "hole punching" nos kernels dos SOs e File Systems
• Reduz IO
– Melhora performance
– Reduz ciclos de escrita, aumentando tempo de vida do SSD
• Aplicável a todas tabelas, includindo system tablespace e UNDO logs
Parceria com Fusion-IO
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: InnoDB Temp Tables
• Novo tablespace dedicado e separado para temporary tables
– Melhor performance para CREATE/DROP
• Mudanças DDL são transientes
– Elimina algumas operações de IO no disco
• Otimiza operações DML – Sem REDO logging, sem change buffering, menor locking
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7: Segurança
• Criptografia AES 256
– Default no MySQL 5.7
• Políticas de Expiração de Senhas
– Podem ser definidas globalmente e no nível do usuário
• Deployment: Permite instalação silenciosa segura – Senha aleatória gerada na instalação
– Remove contas anônimas
– Deployment sem contas ou esquemas de teste e arquivos de exemplo
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. |
MySQL Workbench 6.1 GA, pronto para produção
Oracle Confidential – Internal/Restricted/Highly Restricted 35
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 40
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
MySQL Utilities 1.4 GA, pronto para produção
Oracle Confidential – Internal/Restricted/Highly Restricted 41
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
MySQL Utilities 1.4
• 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: Round-Robin Multi-Source Replication & slave synchronization check
Útil para DevOps e gerenciamento automatizado do MySQL
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
MySQL Fabric 1.4 GA, pronto para produção
Oracle Confidential – Internal/Restricted/Highly Restricted 43
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
HA group
MySQL Fabric 1.4 (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 Alfa, disponível para download e testes no labs.mysql.com
Oracle Confidential – Internal/Restricted/Highly Restricted 45
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
Arquitetura MySQL Cluster
Storage Engines InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc…
Filesystems, Files & Logs Data, Index, Logs…
mysqld
Clients and Apps
ndbd
mgm_ndbd Management
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/Pas
sive
Active/Passi
ve
Active/Pa
ssive
Active/Pass
ive
Active/Pa
ssive
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.10 GA, pronto para produção
Oracle Confidential – Internal/Restricted/Highly Restricted 49
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Backup 3.10
• 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
• Sem área de staging para backup e restore
– No 3.9 completo e incrementas
– No 3.10 melhorado para nível de tabelas
• Novas filtragens para backups parciais
• Backup na Nuvem: Amazon S3
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 51
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 53
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 54
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Plugins Comerciais
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
MySQL Enterprise Audit
• Audit Plugin
• Implementa logs de auditoria com um único comando de instalação
• Flexibilidade na configuração
• Aderente às principais normas de regulação
Oracle Confidential – Internal/Restricted/Highly Restricted 55
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Edition Contatos comerciais
Rubens Lucca
MySQL Setor Público, Oracle
Corina Gigante
MySQL Setor Privado, Oracle
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
MySQLBR
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.1, 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!