mysql 5.6 ga

63
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1 Airton Lastori [email protected] 9-abr-2013 Novidades do MySQL 5.6

Upload: mysql-brasil

Post on 24-May-2015

1.400 views

Category:

Technology


2 download

DESCRIPTION

O que há de novo no MySQL 5.6 do ponto de vista de escalabilidade, performance, instrumentação, maior disponibilidade e acesso NoSQL.

TRANSCRIPT

Page 1: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1

Airton Lastori [email protected]

9-abr-2013

Novidades do MySQL 5.6

Page 2: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 2

@MySQLBR

meetup.com/MySQL-BR

facebook.com/MySQLBR

MySQLBR

Page 3: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 3

Desafios do mercado demandam inovação tecnológica

Novas dimensões dos

problemas que o MySQL

deve resolver

5,9 BILHÕES ASSINATURAS

MÓVEIS EM 2011

1,2+ BILHÃO APPS iOS & Android JÁ AIXADOS EM 2012

2.2 BILHÕES DE USUÁRIOS

630 MILHÕES DE WEBSITES

72 HORAS UPLOAD A CADA

MINUTO

$1 TRILHÃO EM 2013

$700 BILHÕES EM 2011

1 BILHÃO USUÁRIOS

560 MILHÕES ATIVOS DIARIAMENTE

400 MILHÕES

DE TWEETS POR DIA

40% CRESCIMENTO

DE DADOS POR ANO

Page 4: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 4

Agenda

Estratégia Oracle para MySQL

O que há de novo no MySQL 5.6

O que podemos esperar em novas versões

Perguntas?

Page 5: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 5

Agenda

Estratégia Oracle para MySQL

O que há de novo no MySQL 5.6

O que podemos esperar em novas versões

Perguntas?

Page 6: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 6

Alguns clientes MySQL

Page 7: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 7

Alguns clientes MySQL

fonte: alexa.com/topsites 10-mai-2012

Page 8: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 8

MySQL: casos de sucesso

+ de 20 indústrias

mysql.com/customers

Page 9: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 9

MySQL é estratégico para Oracle Soluções Completas

#1 em todos os níveis da pilha

Na nuvem e On Premise

MySQL: Web, Mobile & Embedded

Investimentos na Engenharia do MySQL

Page 10: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 10

MySQL Database Community Server

MySQL Cluster

MySQL Workbench

MySQL Migration Wizard

MySQL Utilities em Python

MySQL Connectors

MySQL Proxy

Documentação não GPL

Forums, Lists, Bugs, Blogs…

Compromisso Oracle com MySQL Community Portfólio disponível para download e uso sob GPL

Page 11: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 11

Oracle Premier Lifetime Support

Oracle Product Certifications/Integrations

MySQL Enterprise High Availability

MySQL Enterprise Security

MySQL Enterprise Scalability

MySQL Enterprise Backup

MySQL Enterprise Monitor/Query Analyzer

MySQL Workbench

MySQL Enterprise Edition Maior produtividade e mitigação de riscos

MySQL Enterprise Audit

Page 12: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 12

mais de 80 gráficos + gráficos personalizados

mais de 170 regras + regras personalizadas

Page 13: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 13

Agenda

Estratégia Oracle para MySQL

O que há de novo no MySQL 5.6

O que podemos esperar em novas versões

Perguntas?

Page 14: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 14

The following 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

decision. The development, release, and timing of any features or

functionality described for Oracle’s products remains at the sole

discretion of Oracle.

Safe Harbor Statement

Page 15: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 15

Suporte às mais

conhecidas

plataformas/linguagens

de desenvolvimento Gerenciamento

eficiente e multi-

thread de sessões Parsing completo

DML+DDL,

otimizador,

baseado em custo,

caching de queries

e resultados

Várias opções de

Storage Engine

para necessidades

específicas das

aplicações

Opções flexíveis de

logging e

armazenamento

físico

Arquitetura MySQL Database

Page 16: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 16

Qual Storage Engine usar?

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 Síncrona, Multi-master

Foreign Keys ✖ ✔ a partir da v7.3

Full-text indexes ✔ a partir da v5.6 ✖

Compressão de dados somente Leitura ✔ ✖

Caches somente Índices Dados e Índices Dados e Índices

Suporte Geospacial Tipos de Dados e Índices somente Tipos de Dados somente Tipos de Dados

Limite de armazenamento 256TB 64TB 384EB

dev.mysql.com/doc/refman/5.5/en/storage-engines.html

Page 17: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 17

Novidades MySQL 5.6

InnoDB

Otimizador

Replicação

Instrumentação

Outras melhorias

5 áreas de melhoria no

novo MySQL

GA, pronto para uso em

produção

mysql.com/downloads/mysql

Page 18: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 18

Novidades MySQL 5.6

InnoDB

Otimizador

Replicação

Instrumentação

Outras melhorias

+ Performance

+ Escalabilidade

+ Flexibilidade, NoSQL

+ Disponibilidade

Page 19: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 19

2008 2009 2010 2013

Up to 4 CPU

MySQL 5.0

Up to 16 CPU

(Sun Micro)

MySQL 5.1 (InnoDB

Plugin)

Up to 32 CPU

(Oracle)

MySQL 5.5

Up to 48 CPU

MySQL 5.6

Evolução da escalabilidade do MySQL

Page 20: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 20

MySQL 5.6.7

48 CPU Threads

Oracle Linux 6

Intel(R) Xeon(R) E7540 x86_64

MySQL leveraging:

- 48 of 96 available CPU threads

- 2 GHz, 512GB RAM

0

2.000

4.000

6.000

8.000

10.000

12.000

12 24 36 48

Tra

ns

õe

s p

or

Se

gu

nd

o

CPU Threads

MySQL 5.6 Escritas+Leituras (Linux)

Escalabilidade MySQL 5.6: InnoDB SysBench Benchmarks

Page 21: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 21

MySQL 5.6.7

Oracle Linux 6

Intel(R) Xeon(R) E7540 x86_64

MySQL leveraging:

- 48 of 96 available CPU threads

- 2 GHz, 512GB RAM

0

2.000

4.000

6.000

8.000

10.000

12.000

14.000

16.000

18.000

12 24 36 48

Tra

ns

õe

s p

or

Se

gu

nd

o

CPU Threads

MySQL 5.6 Leituras (Linux)

Escalabilidade MySQL 5.6: InnoDB SysBench Benchmarks

48 CPU Threads

Page 22: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 24

MySQL 5.5.28

MySQL 5.6.7

+151% Ganhos de Performance

0

2.000

4.000

6.000

8.000

10.000

12.000

32 64 128 256 512 Tra

nsaçõ

es p

or

Seg

un

do

Conexões

MySQL 5.6 vs. 5.5 – Escritas+Leituras (Linux)

Oracle Linux 6

Intel(R) Xeon(R) E7540 x86_64

MySQL leveraging:

- 48 of 96 available CPU threads

- 2 GHz, 512GB RAM

Performance MySQL 5.6: InnoDB SysBench Benchmarks

Page 23: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 25

MySQL 5.5.28

MySQL 5.6.7

+234% Ganhos de Performance

0

2.000

4.000

6.000

8.000

10.000

12.000

14.000

16.000

18.000

32 64 128 256 512

Tra

ns

õe

s p

or

Se

gu

nd

o

Conexões

MySQL 5.6 vs. 5.5 - Leituras (Linux)

Oracle Linux 6

Intel(R) Xeon(R) E7540 x86_64

MySQL leveraging:

- 48 of 96 available CPU threads

- 2 GHz, 512GB RAM

Performance MySQL 5.6: InnoDB SysBench Benchmarks

Page 24: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 26

Aplicações com alta concorrência, leituras intensivas

Desenvolvedor pode controlar a sobrecarga transacional de Leituras

Performance MySQL 5.6: InnoDB Otimizações para LEITURAS

SET autocommit = 1;

SELECT c FROM sbtest WHERE id=N;

SET autocommit = 0;

START TRANSACTION READ ONLY;

SELECT c FROM sbtest WHERE id=N;

COMMIT;

default = Ligado

Modo LEITURA controlado

pelo desenvolvedor

Page 25: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 27

Otimizações para SSD

tamanhos de páginas de 4k e 8k

arquivos .ibd fora do data dir MySQL

tablespaces separados para undo log

Várias melhorias internas

ex. divisão do kernel mutex

Performance MySQL 5.6: InnoDB Otimizações para SSD e melhorias internas

Page 26: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 28

Acesso chave-valor ao

InnoDB Via Memcached API

Usa clients Memcached existentes

Sem SQL parsing, ultra-rápido

Acesso SQL e NotOnlySQL Operações chave-valor mas também

queries SQL, JOINs, FKs, etc.

Memcached com Persistência

no InnoDB Método transparente para persistir

os dados em memória volátil

Memcached plug-in no mysqld ,

mapeado à API nativa do InnoDB

Shared process para baixa latência

SQL (MySQL Client)

InnoDB Storage Engine

MySQL Server Memcached plugin

Application

NoSQL (Memcached Prot.)

mysqld

http://dev.mysql.com/doc/refman/5.6/en/innodb-memcached.html

Flexibilidade MySQL 5.6: InnoDB NoSQL com Memcached

Page 27: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 29

Evolução rápida da aplicação:

Novos tipos de dados

adicionados constantemente

Não requer tempo para

estender o schema ou parada

do servidor

Não requer conhecimento de

modelagem relacional

Escalabilidade incremental

Flexibilidade MySQL 5.6: InnoDB Memcached é Schemaless

Page 28: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 30

Índices FULLTEXT nas tabelas InnoDB

Chaves em conteúdo baseado em texto

Acelera buscas por palavras e frases

Buscas rápidas, totalmente transacionais

Modos de operação: linguagem natural ou booleano, busca por proximidade, ranking de relevância

create table frase_dia

( id int unsigned

auto_increment primary

key

, autor varchar(64)

, frase varchar(4000)

, fonte varchar(64)

, fulltext(frase)

) engine=innodb;

select autor as "Felizes" from frase_dia

where match(frase)

against (‘felicidade' in natural language mode);

Flexibilidade MySQL 5.6: InnoDB Full Text Search

Page 29: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 31

CREATE INDEX

DROP INDEX

Change AUTO_INCREMENT value for a column

ADD/DROP FOREIGN KEY

Rename COLUMN

Change ROW FORMAT, KEY_BLOCK_SIZE for a table

Change COLUMN NULL, NOT_NULL

Add, drop, reorder COLUMN

Disponibilidade MySQL 5.6: InnoDB Operações DDL Online

Page 30: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 32

Exportação/Importação entre instâncias MySQL que estão rodando

Mais rápido que mysqldump (via arquivos ibd portáveis)

CREATE TABLE t(c1 INT) engine=InnoDB;

FLUSH TABLE t FOR EXPORT; -- cria arquivo meta dados consistente

$innodb_data_home_dir/test/t.cfg

UNLOCK TABLES;

Export:

Import: CREATE TABLE t(c1 INT) engine=InnoDB; -- apenas se ainda não existe

ALTER TABLE t DISCARD TABLESPACE;

-- Parar os updates antes de importar

ALTER TABLE t IMPORT TABLESPACE;

Disponibilidade MySQL 5.6: InnoDB Transportable Tablespaces

Page 31: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 33

Dump e restore: aquecimento do buffer pool

- Durante o shutdown ou manualmente a qualquer momento

- Encurta o tempo de estabilização de performance depois de uma reinicialização (de horas para minutos)

Estatísticas Persistentes do Otimizador

- Aumento de estabilidade e consistência dos tempos de execução

- Estatísticas mais precisas, melhor otimização

- Melhor controle do usuário: automático ou manual

Disponibilidade MySQL 5.6: InnoDB Melhorias na inicialização e estabilização

Page 32: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 34

Novidades MySQL 5.6

InnoDB

Otimizador

Replicação

Instrumentação

Outras melhorias

+ Performance

+ Instrumentação

Page 33: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 35

Sem necessidade de transformar em JOINs

Table pull-out

Semi-join

Subquery Materialization

SELECT title FROM film WHERE film_id IN

(SELECT film_id FROM film_actor

GROUP BY film_id HAVING count(*) > 12);

Otimizador do MySQL 5.6 Resolução de problemas com Subqueries

Tempo de execução baixou de DIAS para segundos

Benchmark DBT3 Query #18

Page 34: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 36

Caso de uso: listar os 100 primeiros produtos ordenados por nome

Evita passos intermediários: criar arquivos ordenados, mais de um table scan

Testes numa tabela com 20 milhões de linhas, sort buffer default

CREATE TABLE products(

productid int auto_increment PRIMARY KEY,

productname varchar(200)‏ );

SELECT * FROM products ORDER BY productname LIMIT 100;

Otimizador do MySQL 5.6 Ordenação de arquivo com limites pequenos

4x mais rápido: caiu de 40s para 10s

Page 35: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 37

test per

CREATE TABLE person (

personid INTEGER PRIMARY KEY,

firstname CHAR(20),

lastname CHAR(20),

postalcode INTEGER,

age INTEGER,

address CHAR(50),

KEY k1 (postalcode,age)‏ ) ENGINE=InnoDB;

SELECT lastname, firstname

FROM person

WHERE postalcode BETWEEN 5000 AND 5500

AND age BETWEEN 21 AND 22;

ICP Desabilitado: 15 s (buffer pool 128 MB) e 1,4 s (buffer pool 1.5 GB)

Otimizador do MySQL 5.6 ICP: Index Condition Pushdown

90ms em ambos = melhoria de 15x a 170x

em ambas configurações de buffer pool

Page 36: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 38

Permite EXPLAINs mais rápidos para views/subqueries

Evita materialização quando possível, recuperação mais rápida

Uma chave pode ser gerada para tabelas derivadas

EXPLAIN SELECT * FROM (SELECT * FROM a_big_table);

SELECT … FROM derived_table AS dt

join table AS t WHERE dt.fld = t.dlf

Otimizador do MySQL 5.6 Postpone Materialization

240x mais rápido: caiu de ~8min para ~2s

Page 37: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 39

0 8 16 24 32 40 48 56 645

50

500

5000

1225

9.63

2821

No BKA

BKA

Join Buffer Size (MB)

Query

Tim

e (

secs)

Melhora performance de JOINs

DBT3 Query 13: “Customer Distribution Query”

Otimizador do MySQL 5.6 Batched Key Access (BKA) and Multi-Range Read (MRR)

290x

mais rápido

Page 38: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 40

EXPLAIN

- INSERT, UPDATE e DELETE

- Saída estruturada para EXPLAIN

Optimizer Traces

SET SESSION OPTIMIZER_TRACE=‘enabled=on’; SELECT (SELECT 1 FROM t6 WHERE d = c)

AS RESULT FROM t5;

SELECT * FROM information_schema.OPTIMIZER_TRACE;

Otimizador do MySQL 5.6 Melhor intrumentação para diagnósticos

Page 39: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 41

Novidades MySQL 5.6

InnoDB

Otimizador

Replicação

Instrumentação

Outras melhorias

+ Performance

+ Flexibilidade

+ Disponibilidade

Page 40: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 42

Aplicação

Replicação MySQL

Master Slave

• Modelo assíncrono (padrão)

• Modelo semi-síncrono (a partir da versão 5.5)

Escritas & Leituras

Page 41: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 43

Replicação MySQL

• Divisão de leituras e escritas (R/W Split)

• É possível adicionar mais slaves, dividir a carga

Leituras

Aplicação

Master Slave

Escritas & Leituras

Page 42: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 44

0 5 10

QPS 58,11 144,4 282,53

0

50

100

150

200

250

300

Qu

eri

es p

or

Seg

un

do

Worker Threads

Performance Multi-Threaded Slave Aumento do throughput do

slave

Implementa múltiplas SQL

threads no slave

Paralelismo ao aplicar eventos

em schemas diferentes

Excelente para multi-tentant,

que isolam dados por schemas

Performance da Replicação no MySQL 5.6 Multi-Threaded Slaves

Sysbench: 10 x schemas

Oracle Linux 6.1

Oracle Sun Fire x4150 m2 Server

MySQL leveraging:

- 48 of 96 available CPU threads

- 2 GHz, 512GB RAM

5x mais rápido

Page 43: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 45

Aumenta throughput no master

Commit de múltiplas transações

em grupos no binlog

Locking mais granular, reduzindo

tempos de lock waits

Session

Binary

Log

Master

Database

T1 T2

T3 T4

Group commit

Performance da Replicação no MySQL 5.6 Binary Log Group Commit

Page 44: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 46

Nova opção: binlog-row-image=minimal

Aumenta performance no master e slave

- Reduz tamanho do Binlog, memória & banda de rede

Replica apenas elementos que foram alterados

Primary Key Colunas alteradas

Performance da Replicação no MySQL 5.6 Otimização do modo Row-Based

Page 45: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 47

MySQL 5.6.7

MySQL 5.5.28

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

32 64 128

Tra

ns

õe

s p

or

se

gu

nd

o

Conexões

MySQL 5.6 vs. 5.5 – Escritas+Leituras (Linux)

Oracle Linux 6

Intel(R) Xeon(R) E7540 x86_64

MySQL leveraging:

- 48 of 96 available CPU threads

- 2 GHz, 512GB RAM

Performance da Replicação no MySQL 5.6 Binary Log Group Commit: Binlog = 1

180% mais rápido

Page 46: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 48

Simples de rastrear e

comparar quais eventos foram

replicados nos slaves

Possibilidade de identificar

(automaticamente) o slave

mais atualizado

Permite novas topologias de

múltiplas camadas

Master

GTID=123456

GTID=123456

GTID=123456 GTID=123456

Flexibilidade da Replicação no MySQL 5.6 GTID: Global Transaction IDs

Page 47: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 49

Garante que os dados replicados estão

corretos, consistentes e acessíveis

Detecta eventos de replicação

corrompidos antes deles serem

aplicados

Proteção em todo caminho de

replicação

– Memória > Disco > Rede > OK/NOK

Master

#

Slave

#

Disponibilidade com Replicação no MySQL 5.6 Replication Event Checksums

Page 48: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 50

Antes:

– Transaction Data: in tables

– Replication Info: in files

Data

Position Info

CRASH!

Time

Recuperação automática de um Slave depois de uma falha

Re-estabelece canal de replicação sem intervenção do DBA

Elimina risco de perda ou corrupção de dados

Atomic

MySQL 5.6:

– Transaction Data: in tables

– Replication Info: in tables

Data

Position Info Time

Atomic

Disponibilidade com Replicação no MySQL 5.6 Crash Safe Slaves

Page 49: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 51

Permite self-healing

Failover & recovery automatizado

- mysqlfailover (Utilitário)

Switchover & administração

- mysqlrpladmin (Utilitário)

Alta disponibilidade com MySQL core

- Elimina necessidade de soluções de

terceiros

- Fácil de estender

HA Utilities Monitoramento

Master

Falhou

Slaves

Slave

Promovido

para Master

Disponibilidade com Replicação no MySQL 5.6 Replication HA Utilities (Python)

Page 50: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 52

Novidades MySQL 5.6

InnoDB

Otimizador

Replicação

Instrumentação

Outras melhorias

+ Instrumentação

Page 51: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 53

Mais Instrumentação no MySQL 5.6 P_S: Performance Schema, baixa sobrecarga e ligado por padrão

Statements/Stages

Quais queries mais custosas? Quando elas gastam tempo?

Table/Index I/O, Table Locks

Quais tabelas/índices causam maior carga e/ou contenção?

Network I/O

Qual o comportamento de carga de rede? Quanto tempo as sessões ficam

ociosas?

Users/Hosts/Accounts

Quais usuários/hosts/contas consomem mais recursos?

Summaries

Estatísticas agregadas, agrupadas por thread, user, host, account ou object

Page 52: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 54

Novidades MySQL 5.6

InnoDB

Otimizador

Replicação

Instrumentação

Outras melhorias

+ Segurança

+ Facilidade de uso

+ Flexibilidade

‏…

Page 53: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 55

Alternativas para ocultar senhas em texto simples

Políticas de qualidade da senha

Troca de senha no próximo login

Hash de senha mais fortes

Segurança no MySQL 5.6 Melhor controle de senhas

Page 54: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 56

Novas configurações padrão

TIME/TIMESTAMP/DATETIME – precisão de fração de segundo

TIMESTAMP/DATETIME – CURRENT_TIMESTAMP default /auto update

TIMESTAMP – agora nullable por padrão

Particionamento Melhorado – mais capacidade e performance, import/export, seleção explícita

GIS: operações espaciais precisas

E MAIS...

dev.mysql.com/downloads/mysql

Outras melhorias no MySQL 5.6 Mais facilidade de uso e flexibilidade

Page 55: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 57

Resumo: novidades MySQL 5.6

•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

Page 56: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 58

Agenda

Estratégia Oracle para MySQL

O que há de novo no MySQL 5.6

O que podemos esperar em novas versões

Perguntas?

Page 57: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 59

Optimized for Web, Cloud-based, Embedded use cases

Simplified, Pluggable architecture

- Maintainability, more extensible

- More NoSQL options (HTTP, JSON, JavaScript, etc.)

Refactoring

- Data Dictionary in InnoDB

- Optimizer/Parser/Protocol

InnoDB

- Optimized for mass use cases (read only, fast recovery), GIS

Easy HA, Replication and Sharding

Prioridades para novas versões do MySQL

Page 58: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 60

Downloads & Trials

dev.mysql.com

labs.mysql.com

edelivery.oracle.com

Documentação, Blogs & Fóruns

dev.mysql.com/doc

planet.mysql.com

forums.mysql.com

Artigos & Casos de Sucesso

mysql.com/why-mysql/white-papers

mysql.com/customers

Aprenda mais

Page 59: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 61

MySQL Boot Camp

Accelerated

MySQL Performance

Tuning Boot Camp

Accelerated

MySQL for Begginers

MySQL for Database

Administrators

MySQL Performance

Tuning

MySQL High Availability

MySQL Cluster

MySQL DBA

MySQL Boot Camp

Accelerated

MySQL for Developers

MySQL Performance

Tuning Boot Camp

Accelerated

MySQL for Begginers

MySQL and PHP

Developing Dynamic

Web Applicationg

MySQL Advanced Stored

Procedures

MySQLDeveloper

education.oracle.com

Certificações

Opcional

Necessário

Treinamentos e certificações

Page 60: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 62

Sumário

O crescimento do volume de dados na Web demandam mais

dos bancos de dados nos dias de hoje.

A Oracle investe na engenharia do MySQL para atender estas

novas demandas.

O MySQL 5.6 apresenta muitas melhorias de performance,

disponibilidade e flexibilidade. GA, pronto para usar!

Page 61: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 63

Agenda

Estratégia Oracle para MySQL

O que há de novo no MySQL 5.6

O que podemos esperar em novas versões

Perguntas?

Page 62: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 64

Perguntas?

Novidades do MySQL 5.6 rc

Page 63: MySQL 5.6 GA

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 65

@MySQLBR

meetup.com/MySQL-BR

facebook.com/MySQLBR

Obrigado!