novidades do universo mysql julho-15

78
Novidades do Universo MySQL Airton Lastori [email protected] julho-2015

Upload: mysql-brasil

Post on 13-Aug-2015

617 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Novidades do Universo MySQL julho-15

Novidades do Universo MySQL

Airton Lastori [email protected] julho-2015

Page 2: Novidades do Universo MySQL julho-15

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.

Page 3: Novidades do Universo MySQL julho-15

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

Page 4: Novidades do Universo MySQL julho-15

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

Page 5: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Fonte: http://db-engines.com/en/ranking_trend (junho/15)

Page 6: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL: evolução com foco nas necessidades dos usuários

7

Web, Cloud, Distribuído e Embarcado…

Page 7: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Evolução da arquitetura do MySQL

• Mais Modularidade

– Refactoring do Optimizer, Parser, Runtime

• 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

8

Foco em Web, Cloud, Distribuído, Embarcado

Page 8: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Central @ Oracle Open World 2014

• [slides] oracle.com/openworld/mysql

Alguns cases apresentados...

Page 9: Novidades do Universo MySQL julho-15

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

Page 10: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Database Rápida retrospectiva

Page 11: Novidades do Universo MySQL julho-15

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)

Page 12: Novidades do Universo MySQL julho-15

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

Page 13: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Atualize! MySQL 5.6 e InnoDB

Oracle Confidential – Internal/Restricted/Highly Restricted 14

Page 14: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

No Windows: MySQL Installer Next, Next... Finish!

dev.mysql.com/downloads/windows/installer

Page 15: Novidades do Universo MySQL julho-15

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

Page 16: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

…ou manualmente via binários pré-compilados

Page 18: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Database 5.7 RC Disponível para download e testes, ainda não recomendado para produção

Oracle Confidential – Internal/Restricted/Highly Restricted 19

Page 19: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL 5.7 Release Candidate

20

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

Page 20: Novidades do Universo MySQL julho-15

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

RC

mysqlserverteam.com/the-mysql-5-7-7-release-candidate-is-available

Page 21: Novidades do Universo MySQL julho-15

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

Qu

erie

s p

er S

eco

nd

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

22

Page 22: Novidades do Universo MySQL julho-15

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

Co

nn

ecti

on

s/Se

con

d

Connections Per Second

MySQL 5.5

MySQL 5.6

MySQL 5.7

23

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

Page 23: Novidades do Universo MySQL julho-15

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

Qu

erie

s p

er S

eco

nd

Connections

MySQL 5.7 vs 5.6 - InnoDB & Memcached

MySQL 5.7

MySQL 5.6

1 Milhão de QPS

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

Page 24: Novidades do Universo MySQL julho-15

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

Page 25: Novidades do Universo MySQL julho-15

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

Page 26: Novidades do Universo MySQL julho-15

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

Page 27: Novidades do Universo MySQL julho-15

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.

Page 28: Novidades do Universo MySQL julho-15

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

SlaveThreads

Slavethroughputvs.96ThreadMaster

Page 29: Novidades do Universo MySQL julho-15

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

Page 30: Novidades do Universo MySQL julho-15

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

Page 31: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL 5.7: Optimizer - EXPLAIN expandido e visual

32

"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" ], ...

Page 32: Novidades do Universo MySQL julho-15

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>;

Page 33: Novidades do Universo MySQL julho-15

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

Page 34: Novidades do Universo MySQL julho-15

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

35

Page 35: Novidades do Universo MySQL julho-15

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

Exe

cuti

on

tim

e r

ela

tive

to

5.6

(%

)

5 out of 22 queries get a much improved query plan (others remain the same)

MySQL 5.6

MySQL 5.7

Page 36: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

0

20

40

60

80

100

Q2 Q18

Exe

cuti

on

tim

e r

ela

tive

to

5.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

Exe

cuti

on

tim

e r

ela

tive

to

5.6

(%

)

Disk bound

5.6

5.7

Page 37: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL 5.7 Release Candidate

39

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

Page 38: Novidades do Universo MySQL julho-15

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

Page 39: Novidades do Universo MySQL julho-15

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

Page 40: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Page 41: Novidades do Universo MySQL julho-15

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

43

Page 42: Novidades do Universo MySQL julho-15

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

Page 43: Novidades do Universo MySQL julho-15

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 45

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

Page 44: Novidades do Universo MySQL julho-15

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 List Applications

Page 46: Novidades do Universo MySQL julho-15

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()

Page 47: Novidades do Universo MySQL julho-15

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;

Page 48: Novidades do Universo MySQL julho-15

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

Page 49: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Participe com seu Feedback

bugs.mysql.com

Page 50: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Código-fonte no GitHub

bugs.mysql.com

Page 51: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Utilities & Fabric 1.5

Oracle Confidential – Internal/Restricted/Highly Restricted 57

Page 52: Novidades do Universo MySQL julho-15

Copyright © 2015 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: 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

Page 53: Novidades do Universo MySQL julho-15

Copyright © 2015 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, Python, PHP

Page 54: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Limitações da versão atual

• Versão inicial, foco na simplicidade e robustez

– Alta-disponibilidade OK, escalabilidade de escrita em andamento

• Sharding não é completamente transparente para aplicação

– Necessário fornecer a sharding key

• Colunas Auto-increment não podem ser usadas como sharding key

• Sem Joins envolvendo múltiplos shards

• MySQL Connector (driver) deve suportar Fabric

– atualmente disponível para Java, Python e PHP

• O nó Fabric por si só não é tolerante a falhas

– O connector tem seu cache local e continua operando quando o processo Fabric não está disponível

Page 55: Novidades do Universo MySQL julho-15

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

Page 56: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Cluster 7.4

Oracle Confidential – Internal/Restricted/Highly Restricted 63

Page 57: Novidades do Universo MySQL julho-15

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 65

Page 58: Novidades do Universo MySQL julho-15

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

Page 59: Novidades do Universo MySQL julho-15

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

67

Page 60: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Workbench 6.3

Oracle Confidential – Internal/Restricted/Highly Restricted 68

Page 61: Novidades do Universo MySQL julho-15

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

69

• New Easy to Use Wizards for – Fast Data Migration

– Table<->File Data Import/Export (like Excel)

– SSL Certificate Creation

Page 62: Novidades do Universo MySQL julho-15

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

Page 63: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Page 64: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Page 65: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 75

Page 66: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

O que vem por aí…

Oracle Confidential – Internal/Restricted/Highly Restricted 76

Page 67: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Labs Builds especiais para testes da comunidade

dev.mysql.com/downloads/mysql

Page 68: Novidades do Universo MySQL julho-15

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

Page 69: Novidades do Universo MySQL julho-15

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 Generated Columns – InnoDB supports indexes on both stored and virtual Generated Columns

– New expression analyzer automatically uses the best “functional” index available

80

labs.mysql.com

Page 70: Novidades do Universo MySQL julho-15

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

Page 71: Novidades do Universo MySQL julho-15

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

Page 72: Novidades do Universo MySQL julho-15

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.

Page 73: Novidades do Universo MySQL julho-15

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

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

Page 74: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

@MySQLBR meetup.com/MySQL-BR facebook.com/MySQLBR

pt.planet.mysql.com

Page 75: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Obrigado!

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Page 76: Novidades do Universo MySQL julho-15
Page 77: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

Perguntas?

Novidades do Universo MySQL Contato: [email protected] twitter.com/mysqlbr facebook.com/mysqlbr

Page 78: Novidades do Universo MySQL julho-15

Copyright © 2015 Oracle and/or its affiliates. All rights reserved. |

MySQL Enterprise Edition Contatos comerciais

Marcos Trujillo

Enterprise Sales, Oracle

[email protected]

Alison Rabelo

OEM/ISV Sales, Oracle

[email protected]