SlideShare uma empresa Scribd logo
1 de 87
Baixar para ler offline
Mais performance com MySQL 5.6

Airton Lastori
30-nov-2013
Safe Harbour Statement
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 decisions. The development,
release, and timing of any features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.

2

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Agenda

 Melhorias no MySQL 5.6
 Tuning do servidor
 Índices eficientes
 Visual EXPLAIN
 Performance Schema

3

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
MySQL é estratégico para Oracle
 Soluções Completas
 #1 em todos os níveis da pilha

 Cloud e On Premise
 MySQL: Web, Mobile & Embedded
 Investimentos na Engenharia do MySQL

4

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Alguns clientes MySQL

5

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Compromisso Oracle com MySQL

https://blogs.oracle.com/MySQL/entry/mysql_connect_keynotes_and_news
6

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
@MySQLBR

facebook.com/MySQLBR

meetup.com/MySQL-BR

7

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

MySQLBR
Melhorias no MySQL 5.6

8

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Arquitetura MySQL Server
Clients & Connectors
Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl

Clients and Apps

mysqld

Connection Pool, SQL Interface, Parser, Optimizer, Caches

Enterprise Management
Services and Utilities
Storage Engines
InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc…

Filesystems, Files & Logs
Data, Index, Logs…

9

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

Backup & Recovery
Monitor
Workbench
Utilities
Default Storage Engine
InnoDB

10

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Storage Engines
MyISAM

InnoDB

NDB Cluster

✖

✔

✔

Tabela

Linha

Linha

Assíncrona ou
Semi-síncrona

Assíncrona ou
Semi-síncrona, crash-safe

Síncrona, Multi-master,
crash-safe sem SPOF

Foreign Keys

✖

✔

✔

Full-text indexes

✔

✔

✖

Compressão de dados

somente Leitura

✔

✖

Caches

somente Índices

Dados e Índices

Dados e Índices

Tipos de Dados e Índices

Somente Tipos de Dados

somente Tipos de Dados

256TB

64TB

384EB (~3TB em RAM)

Transações
Nível de Lock
Replicação

Suporte Geoespacial
Limite de armazenamento

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

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Evolução da escalabilidade do MySQL

2008

2009

2010

2013

até 4 CPU
MySQL 5.0

até 16 CPU
MySQL 5.1

até 32 CPU
MySQL 5.5

até 48 CPU
MySQL 5.6

MySQL AB

Sun

Oracle

Atualize o MySQL e use InnoDB.
12

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Performance MySQL 5.6: InnoDB
SysBench Benchmarks

Transações por Segundo

MySQL 5.6 vs. 5.5 - Leituras (Linux)
18.000
16.000
14.000
12.000
10.000
8.000
6.000
4.000
2.000
0

MySQL 5.6.7

MySQL 5.5.28

32

64

128
Conexões

256

512

+234% Ganhos de Performance
13

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

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

Transações por Segundo

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

MySQL 5.6.7

10.000
8.000

6.000

MySQL 5.5.28

4.000
2.000
0
32

64

128
Conexões

256

512

+151% Ganhos de Performance
14

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

Oracle Linux 6
Intel(R) Xeon(R) E7540 x86_64
MySQL leveraging:
- 48 of 96 available CPU threads
- 2 GHz, 512GB RAM
MySQL Enterprise Scalability
 Thread Pool Plug-In
•
•

•
•

Adiciona mais inteligência ao modelo padrão de gerenciamento de
threads – agrupa e reutiliza
Modelo padrão, sem Thread Pool: 1 thread por conexão,
performance excelente, mas limita a escalabilidade ao crescer o
número de conexões de usuários
Com Thread Pool: reúso de threds, escala o número de conexões
de usuários mantendo os mesmos níveis de performance
Implementado utilizando Thread Pool API

Assegura desempenho melhor e sustentável, mesmo quando o
número de usuários continua crescendo.
15

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Thread Pool habilitado/desabilitado

60x Melhor Escalabilidade comThread Pool
16

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

MySQL 5.6.11
Oracle Linux 6.3, Unbreakable Kernel 2.6.32
4 sockets, 24 cores, 48 Threads
Intel(R) Xeon(R) E7540 2GHz CPUs
512GB DDR3 RAM
Thread Pool habilitado/desabilitado

18x Melhor Escalabilidade com Thread Pool
17

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

MySQL 5.6.11
Oracle Linux 6.3, Unbreakable Kernel 2.6.32
4 sockets, 24 cores, 48 Threads
Intel(R) Xeon(R) E7540 2GHz CPUs
512GB DDR3 RAM
Otimizador do MySQL 5.6
Resolução de problemas com Subqueries
SELECT title FROM film WHERE film_id IN
(SELECT film_id FROM film_actor
GROUP BY film_id HAVING count(*) > 12);

 Sem necessidade de transformar em JOINs
 Table pull-out
 Semi-join
 Subquery Materialization

Tempo de execução baixou de DIAS para segundos
Benchmark DBT3 Query #18

18

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Otimizador do MySQL 5.6
Ordenação de arquivo com limites pequenos
CREATE TABLE products(
productid int auto_increment PRIMARY KEY,
productname varchar(200)‫‏‬
);
SELECT * FROM products ORDER BY productname LIMIT 100;

 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

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

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Otimizador do MySQL 5.6
ICP: Index Condition Pushdown
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;

pe test
r

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)
90ms em ambos = melhoria de 15x a 170x
em ambas configurações de buffer pool

20

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Otimizador do MySQL 5.6
Postpone Materialization
EXPLAIN SELECT * FROM (SELECT * FROM a_big_table);
SELECT … FROM derived_table AS dt
join table AS t WHERE dt.fld = t.dlf

 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

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

21

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Otimizador do MySQL 5.6
Batched Key Access (BKA) and Multi-Range Read (MRR)
Melhora performance de JOINs
5000
2821

DBT3 Query 13: “Customer Distribution Query”

Query Time (secs)

1225

500

No BKA
BKA
50

9.63

5
0

8

16

24

32

40

Join Buffer Size (MB)

22

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

48

56

64

290x
mais rápido
Otimizador do MySQL 5.6
Melhor intrumentação para diagnósticos

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

23

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Otimizador do MySQL 5.6
Melhorias na inicialização e estabilização
 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
[mysqld]
innodb_stats_persistent = 1

24

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

# use ANALYZE TABLE periodicamente para todas tabelas
Mais Instrumentação no MySQL 5.6
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
25

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Outras melhorias no MySQL 5.6
Mais facilidade de uso e flexibilidade
 Novas configurações padrão, mais adequadas ao hardware atual
 Particionamento melhorado
 import/export
 mais capacidade e performance
 seleção explícita

 Backup remoto do Binlog
 Slaves com atraso programado
 Identificador único universal para servidor (server UUID)
 TIME/TIMESTAMP/DATETIME
 precisão de fração de segundo
 CURRENT_TIMESTAMP default /auto update

 TIMESTAMP nullable por padrão

 GIS: operações espaciais precisas
 E MAIS...
26

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

mysql.com/why-mysql/white-papers/whats-new-mysql-5-6
Tuning do MySQL Server

27

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
O loop infinito do tuning...
Monitoramento

etc...

Melhorias

28

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

Tuning

Otimizações
O loop infinito do tuning...
Monitoramento

etc...

Melhorias

29

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

Em mais de 90%
dos casos o
problema está na
aplicação
Tuning

Otimizações
Sistema Operacional
 Linux
– Usar malloc() lib jemalloc

 Oracle Solaris
– Usar malloc() lib libumem

 Microsoft Windows

http://www.mysql.com/support/supportedplatforms/database.html

30

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
O hardware ideal para o MySQL Server
 Até 64 CPU threads x86-64 bit (requer MySQL 5.6 ou

superior)
 RAM igual ou maior que dataset “mais quente”
(acessado com maior frequência)
 2 x placas de rede
 2 x fontes de alimentação

31

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
O hardware ideal para o MySQL Server
 Mínimo de 4 x SSDs ou HDDs. 8–16 drives

aumentarão a performance para cargas de I/O
intensivo
– Hardware RAID com battery-backed cache
– RAID 10 recomendado; RAID 5 está OK se carga de

leitura intensiva
 Rede redundante
 Alimentação redundante

32

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Performance Tuning do MySQL Server
 Principal dica: use seu cérebro!
 Receitas de bolo são limitidas, o contexto muda tudo
 Treinamento oficial 4 dias, education.oracle.com/mysql

…esta apresentação: 50min!
 Regras básicas
– Nunca faça mudanças diretamente em produção
– Tenha um bom método de benchmark ou carga regular
– Tenha as métricas iniciais (baseline) e vá ajustando até

conseguir seu objetivo; monitore e saiba quando parar
– Apenas 1 mudança de cada vez

33

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Benchmark
 mysqlslap

http://dev.mysql.com/doc/refman/5.6/en/mysqlslap.html
 supersmack http://vegan.net/tony/supersmack

 mybench http://jeremy.zawodny.com/mysql/mybench
 SysBench http://sysbench.sourceforge.net
 DBT2 http://osdldbt.sourceforge.net/

 Faça você mesmo:
– general query log output (table/file)
– – JMeter, LoadRunner, Visual Studio

34

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Monitoramento
 Monitore, documente e salve os resultados
 Métricas de Query
– throughput

– single query time
– average query time

 Métricas CPU: top, vmstat
 Métricas IO: iostat, top, vmstat, bonnie++
 Ferramentas: MySQL Enterprise Monitor, slow query

log, status variables, Performance_Schema, etc.

35

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
36

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
37

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Variáveis
 Configure as System Variables (aka Options)
– ex. datadir, port, innodb_buffer_pool_size
– my.cnf ou linha de comando
– SHOW <GLOBAL/SESSION> VARIABLES
– Algumas Dínamicas (altere via comando SET); outras podem

precisar de inicialização:

 Monitore as Status Variables
– SHOW <GLOBAL/SESSION> STATUS VARIABLES
– mysqladmin ext -ri10 > arquivo.txt

http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
http://dev.mysql.com/doc/refman/5.6/en/server-status-variables.html
http://dev.mysql.com/doc/mysqld-version-reference/en/index.html
38

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
System Variables / Options
 5.6
– Updated Defaults for Modern Systems
– Auto-sized Variables

 Prior to 5.6
– Out-of-date Configuration File Samples

 example: my-innodb-heavy-4G.cnf
 Advice:
– Consider 5.6 Defaults

– Re-evaluate older config file entries

39

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Tuning do InnoDB

Monitore
• innodb_buffer_pool_reads
• innodb_buffer_pool_read_requests
• mysql> show status like
'Innodb_buffer%' ;

40

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

Tune
• innodb_buffer_pool_size
• por volta de 80% da memória
disponível
• innodb_log_file_size = ~512MB 5.5+
• tradeoff: tempo de recuperação vs.
performance
• Muitas escritas
Tuning do InnoDB, próximo nível
depende do seu workload
 innodb_flush_log_at_trx_commit (cuidado!)
– valor 1: sync para arquivo (fsync) a cada commit

– valores 0/2: pode perder 1 segundo de dados

 innodb_flush_method = O_Direct
– Depende do workload e hardware

 innodb_buffer_pool_instances = 8
– Somente 5.5 e 5.6

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

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Tuning do MyISAM
Monitore
• key_read_requests
• key_reads
• key_buffer_size

Tune
• Caches
• key_buffer_cache – 25% da
memória disponível
• System Cache – 75% da memória
disponível
• Múltiplos Key Buffers
• Pré-carregamento de Key Buffers

http://dev.mysql.com/doc/refman/5.6/en/myisam-key-cache.html
42

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Query Cache
depende do seu workload
Monitore
• have_query_cache
• qcache_hits
• qcache_inserts
• qcache_not_cached
• qcache_total_blocks
• qcache_free_memory

43

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

Tune
• Use apenas quando:
• Queries e ResultSets são idênticos
• Poucos Inserts/Updates/Deletes
• query_cache_type
• 0 ou OFF
• 1 ou ON tudo, exceto hints SELECT
SQL_NO_CACHE
• 2 or DEMAND nada, exceto hint SELECT
SQL_CACHE
Tabelas Temporárias
cuidado com consumo excessivo de RAM

Monitore
• created_tmp_tables
• created_tmp_disk_tables

Tune
• tmp_table_size
• tamanho máximo para tabelas “in memory”
• Se temporary table >
• tmp_table_size || max_heap_table_size ||
BLOB/TEXT
• Então converte para tabela MyISAM em
disco

http://dev.mysql.com/doc/refman/5.6/en/internal-temporary-tables.html
44

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Outras variáveis de uso geral 1
normalmente passam por tuning

Monitore

• %opened%
• %thread%
• threads_created

45

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

Tune

• table_open_cache
• 5.6 mudou default de 400 - 2000
• thread_cache_size
• meta threads_created ~
thread_cache_size
Outras variáveis de uso geral 2
cuidado com tamanhos maiores

Monitore
• %opened%
• %thread%
• threads_created

Depende do workload ou query
Maior nem sempre é melhor
Usa memória por Thread ou
JOIN

Tune
• sort_buffer_size
• sorting for group by and order by
• If 100M = 100M of RAM per sort
• mixed results in lab
• 2M -> 256K in 5.6
Dicas:
•Comece com o default vá
alterando gradualmente
•Ajuste dinamicamente

46

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Outras variáveis de uso geral 3
cuidado com tamanhos maiores

Monitore
• select_full_join

Depende do workload ou query
Maior nem sempre é melhor
Usa memória por Thread ou
JOIN

Tune
• join_buffer_size
• JOINS que não usam indices
• Alocado por JOIN por thread!
Dicas:
•Comece com o default vá
alterando gradualmente
•Ajuste dinamicamente
•Invista na otimização da
Query

47

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Resumo
Menos tuning é necessário com defaults do MySQL 5.6
Tuning obrigatório:

 thread_cache_size 0->8+max_con/100

 InnoDB Buffer Pool

 query cache

 Key Buffer Cache (MyISAM)

 tmp_table_size

Tune e Avalie resultados:

Cuidado:

 innodb_log_file_size 5M->48M

 sort_buffer_size 2MB->256K

 innodb_flush_log_at_trx_commit

 join_buffer_size 128K->256K

 innodb_flush_method

 read_buffer_size (MyISAM)

 innodb_buffer_pool_instances 1->8

 read_rnd_buffer_size

 table_open_cache 400->2000

http://blogs.oracle.com/supportingmysql/entry/server_defaults_changes_in_mysql
49

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Índices eficientes

50

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
51

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
52

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
53

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
54

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
55

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
56

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
57

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
58

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
59

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
60

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Visual EXPLAIN

61

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
62

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
63

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
64

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
65

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
66

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
67

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
68

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Performance Schema

70

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
71

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
72

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
73

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
74

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
75

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Considere MySQL Enterprise para
implementar boas práticas

77

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Binários MySQL comunidade
Pacote Enterprise: Suporte + Backup + Monitor & Workbench
Suporte

Plug-ins

Backup

Monitor &
Workbench

78

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Binários MySQL comerciais
Certificado no stack Oracle + patches e hotfixes
Suporte

Escalabilidade
Segurança
Auditoria

Plug-ins

Backup

Monitor &
Workbench

79

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
MySQL Cluster Carrier-Grade Edition
Subscrição com renovação anual: ferramentas + serviços
Gerenciamento
Consolidado

Cluster
Manager

Plug-ins

Suporte

Cluster

Monitor &
Workbench

80

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

Backup
84

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Backup










Backup online para InnoDB
Backups completos, incrementais, parciais (automatizados via script)
Compressão
Opções de Recovery: Point in Time, Completo, Parcial
Metadados de status, progresso e histórico
mysqlbackup
Tamanho ilimitado do BD
Multi-Plataforma
MEB
MySQL
Backup
Database
Files
Files
Windows, Linux, Unix
Certificado para Oracle Secure Backup, compatível SBT
Backup e Recovery mais rápidos e online.

85

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Audit
 Audit Plug-In
• Registro de conexões, logins, queries dos servidores MySQL
• Políticas definidas pelo DBA para filtragem e rotação de logs
• Habilitado ou desabilitado dinamicamente, sem reiniciar o

servidor
• Log em XML de acordo com especificação padrão Oracle Audit
• Requer MySQL 5.5.28 ou superior
• Implementado através MySQL 5.5 Audit API

Adiciona conformidade regulatória em aplicações MySQL:
HIPAA, Sarbanes-Oxley, PCI, etc.
86

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Audit
3. Conexões e queries dos
usuários aparecem no log

1. DBA habilita no Server1

Server1

2. Usuário conecta-se e executa queries
87

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Security
External Authentication Plug-Ins
 PAM (Pluggable Authentication Modules) Plug-In
•

•
•

Autenticação externa via métodos externos
Interface padrão, funciona com Unix, LDAP, Kerberos, outros
Proxy-users – mapeamento grupos de usuários para 1 usuário

 Windows Plug-In
•
•
•

Acesso nativo via serviços do Windows
Autentica usuários já logados no Windows (Single Sign On)
Grupos/usuários do Windows Active Directory com Proxy-users

Integra o MySQL com a infraestrutura de segurança existente e
SOPs. Mais produtividade na gestão de usuários.
88

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Security
External Authentication Plug-Ins
Usuário/senha definidos no diretório
Privilégios definidos no MySQL e
mapeados para usuários/grupos do diretório
PAM /
Windows Auth

LDAP/AD
Authenticate

CREATE USER win_joe
IDENTIFIED WITH authentication_windows
AS ‘joe';

89

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Conclusão
 MySQL 5.6, várias melhorias na performance
 Sobre tuning: metodologia e outros componentes da pilha
 Tuning do MySQL 5.6
– Variáveis
– Índices
– Visual Explain e Performance Schema

 MySQL Enterprise

90

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
Saiba Mais
 Treinamento oficial MySQL Performance Tuning
http://education.oracle.com/mysql

 Performance Tuning Webinars
http://www.mysql.com/news-and-events/on-demand-webinars

 MySQL Performance Forum
http://forums.mysql.com/list.php?24

 Download MySQL 5.6
http://www.mysql.com/downloads/mysql

 MySQL Enterprise Monitor (trial 30 dias)
http://www.mysql.com/trials

91

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
@MySQLBR

facebook.com/MySQLBR

meetup.com/MySQL-BR

92

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

Obrigado!
Mais performance com MySQL 5.6

Perguntas?

Mais conteúdo relacionado

Mais procurados

Linguagem de Programação Python
Linguagem de Programação PythonLinguagem de Programação Python
Linguagem de Programação PythonJunior Sobrenome
 
An introduction to Jupyter notebooks and the Noteable service
An introduction to Jupyter notebooks and the Noteable serviceAn introduction to Jupyter notebooks and the Noteable service
An introduction to Jupyter notebooks and the Noteable serviceJisc
 
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...Amazon Web Services
 
Aula04 Sistemas Distribuídos - Processos
Aula04 Sistemas Distribuídos - ProcessosAula04 Sistemas Distribuídos - Processos
Aula04 Sistemas Distribuídos - ProcessosMessias Batista
 
Operating system 40 lru algorithm
Operating system 40 lru algorithmOperating system 40 lru algorithm
Operating system 40 lru algorithmVaibhav Khanna
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?Mydbops
 
Banco de Dados I Aula 06 - Generalização e Especialização
Banco de Dados I Aula 06 - Generalização e EspecializaçãoBanco de Dados I Aula 06 - Generalização e Especialização
Banco de Dados I Aula 06 - Generalização e EspecializaçãoLeinylson Fontinele
 
M|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScaleM|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScaleMariaDB plc
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Ra'Fat Al-Msie'deen
 
Introduction to numpy Session 1
Introduction to numpy Session 1Introduction to numpy Session 1
Introduction to numpy Session 1Jatin Miglani
 
41 page replacement fifo
41 page replacement fifo41 page replacement fifo
41 page replacement fifomyrajendra
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016Wagner Bianchi
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 InstancesBrendan Gregg
 
MariaDB Other Features
MariaDB Other FeaturesMariaDB Other Features
MariaDB Other FeaturesJongJin Lee
 
[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.
[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.
[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.NAVER D2
 

Mais procurados (20)

Linguagem de Programação Python
Linguagem de Programação PythonLinguagem de Programação Python
Linguagem de Programação Python
 
An introduction to Jupyter notebooks and the Noteable service
An introduction to Jupyter notebooks and the Noteable serviceAn introduction to Jupyter notebooks and the Noteable service
An introduction to Jupyter notebooks and the Noteable service
 
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
Deep Dive on Amazon EC2 Instances & Performance Optimization Best Practices (...
 
Aula04 Sistemas Distribuídos - Processos
Aula04 Sistemas Distribuídos - ProcessosAula04 Sistemas Distribuídos - Processos
Aula04 Sistemas Distribuídos - Processos
 
Operating system 40 lru algorithm
Operating system 40 lru algorithmOperating system 40 lru algorithm
Operating system 40 lru algorithm
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?
 
Banco de Dados I Aula 06 - Generalização e Especialização
Banco de Dados I Aula 06 - Generalização e EspecializaçãoBanco de Dados I Aula 06 - Generalização e Especialização
Banco de Dados I Aula 06 - Generalização e Especialização
 
M|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScaleM|18 Architectural Overview: MariaDB MaxScale
M|18 Architectural Overview: MariaDB MaxScale
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 
Apostila modelagem de banco de dados
Apostila modelagem de banco de dadosApostila modelagem de banco de dados
Apostila modelagem de banco de dados
 
TinyBERT
TinyBERTTinyBERT
TinyBERT
 
Introduction to numpy Session 1
Introduction to numpy Session 1Introduction to numpy Session 1
Introduction to numpy Session 1
 
Postgre sql best_practices
Postgre sql best_practicesPostgre sql best_practices
Postgre sql best_practices
 
Introduction to numpy
Introduction to numpyIntroduction to numpy
Introduction to numpy
 
41 page replacement fifo
41 page replacement fifo41 page replacement fifo
41 page replacement fifo
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 
MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016MySQL Multi-Source Replication for PL2016
MySQL Multi-Source Replication for PL2016
 
Performance Tuning EC2 Instances
Performance Tuning EC2 InstancesPerformance Tuning EC2 Instances
Performance Tuning EC2 Instances
 
MariaDB Other Features
MariaDB Other FeaturesMariaDB Other Features
MariaDB Other Features
 
[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.
[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.
[135] 오픈소스 데이터베이스, 은행 서비스에 첫발을 내밀다.
 

Semelhante a Mais performance com o MySQL 5.6

Novidades do Universo MySQL Maio 2014
Novidades do Universo MySQL Maio 2014Novidades do Universo MySQL Maio 2014
Novidades do Universo MySQL Maio 2014MySQL Brasil
 
Guia essencial para embarcar o MySQL em seu produto
Guia essencial para embarcar o MySQL em seu produtoGuia essencial para embarcar o MySQL em seu produto
Guia essencial para embarcar o MySQL em seu produtoMySQL Brasil
 
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014MySQL Brasil
 
Serviços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e JavaServiços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e JavaMySQL Brasil
 
Arquiteturas de referência MySQL
Arquiteturas de referência MySQLArquiteturas de referência MySQL
Arquiteturas de referência MySQLMySQL Brasil
 
Novidades do Universo MySQL Agosto 2014
Novidades do Universo MySQL Agosto 2014Novidades do Universo MySQL Agosto 2014
Novidades do Universo MySQL Agosto 2014MySQL Brasil
 
Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15MySQL Brasil
 
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHPAlta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHPMySQL Brasil
 
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...MySQL Brasil
 
MySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Brasil
 
Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016MySQL Brasil
 
Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15MySQL Brasil
 
Desenvolvendo serviços escaláveis e de alta performance com MySQL
Desenvolvendo serviços escaláveis e de alta performance com MySQLDesenvolvendo serviços escaláveis e de alta performance com MySQL
Desenvolvendo serviços escaláveis e de alta performance com MySQLMySQL Brasil
 
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...MySQL Brasil
 
MySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Brasil
 
Alta-disponibilidade e alta performance com o MySQL Cluster 7.3
Alta-disponibilidade e alta performance com o MySQL Cluster 7.3Alta-disponibilidade e alta performance com o MySQL Cluster 7.3
Alta-disponibilidade e alta performance com o MySQL Cluster 7.3MySQL Brasil
 
Alta-disponibilidade com MySQL
Alta-disponibilidade com MySQLAlta-disponibilidade com MySQL
Alta-disponibilidade com MySQLMySQL Brasil
 
MySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Brasil
 
Sessão Avançada: Amazon Aurora - DAT302 - Sao Paulo Summit
Sessão Avançada: Amazon Aurora -  DAT302 - Sao Paulo SummitSessão Avançada: Amazon Aurora -  DAT302 - Sao Paulo Summit
Sessão Avançada: Amazon Aurora - DAT302 - Sao Paulo SummitAmazon Web Services
 

Semelhante a Mais performance com o MySQL 5.6 (20)

Novidades do Universo MySQL Maio 2014
Novidades do Universo MySQL Maio 2014Novidades do Universo MySQL Maio 2014
Novidades do Universo MySQL Maio 2014
 
Guia essencial para embarcar o MySQL em seu produto
Guia essencial para embarcar o MySQL em seu produtoGuia essencial para embarcar o MySQL em seu produto
Guia essencial para embarcar o MySQL em seu produto
 
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
Novidades do Universo MySQL para PHP Web Developers - Dezembro 2014
 
Serviços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e JavaServiços Escaláveis e de Alta Performance com MySQL e Java
Serviços Escaláveis e de Alta Performance com MySQL e Java
 
Arquiteturas de referência MySQL
Arquiteturas de referência MySQLArquiteturas de referência MySQL
Arquiteturas de referência MySQL
 
Novidades do Universo MySQL Agosto 2014
Novidades do Universo MySQL Agosto 2014Novidades do Universo MySQL Agosto 2014
Novidades do Universo MySQL Agosto 2014
 
Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15Novidades do Universo MySQL julho-15
Novidades do Universo MySQL julho-15
 
Apresentação MySQL Enterprise
Apresentação MySQL EnterpriseApresentação MySQL Enterprise
Apresentação MySQL Enterprise
 
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHPAlta Disponibilidade no MySQL 5.7 para aplicações em PHP
Alta Disponibilidade no MySQL 5.7 para aplicações em PHP
 
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
Otimizando a segurança, o desempenho e a disponibilidade com o MySQL Enterpri...
 
MySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Cluster - visão geral
MySQL Cluster - visão geral
 
Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016Alta disponibilidade no MySQL 5.7 GUOB 2016
Alta disponibilidade no MySQL 5.7 GUOB 2016
 
Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15Novidades do MySQL para desenvolvedores ago15
Novidades do MySQL para desenvolvedores ago15
 
Desenvolvendo serviços escaláveis e de alta performance com MySQL
Desenvolvendo serviços escaláveis e de alta performance com MySQLDesenvolvendo serviços escaláveis e de alta performance com MySQL
Desenvolvendo serviços escaláveis e de alta performance com MySQL
 
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
Aumentando a segurança, disponibilidade e desempenho com MySQL Enterprise Edi...
 
MySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Cluster - visão geral
MySQL Cluster - visão geral
 
Alta-disponibilidade e alta performance com o MySQL Cluster 7.3
Alta-disponibilidade e alta performance com o MySQL Cluster 7.3Alta-disponibilidade e alta performance com o MySQL Cluster 7.3
Alta-disponibilidade e alta performance com o MySQL Cluster 7.3
 
Alta-disponibilidade com MySQL
Alta-disponibilidade com MySQLAlta-disponibilidade com MySQL
Alta-disponibilidade com MySQL
 
MySQL Cluster - visão geral
MySQL Cluster - visão geralMySQL Cluster - visão geral
MySQL Cluster - visão geral
 
Sessão Avançada: Amazon Aurora - DAT302 - Sao Paulo Summit
Sessão Avançada: Amazon Aurora -  DAT302 - Sao Paulo SummitSessão Avançada: Amazon Aurora -  DAT302 - Sao Paulo Summit
Sessão Avançada: Amazon Aurora - DAT302 - Sao Paulo Summit
 

Mais de MySQL Brasil

MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017MySQL Brasil
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL Brasil
 
Alta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL EnterpriseAlta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL EnterpriseMySQL Brasil
 
MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17MySQL Brasil
 
Segurança no MySQL
Segurança no MySQLSegurança no MySQL
Segurança no MySQLMySQL Brasil
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQLMySQL Brasil
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL Brasil
 
Enabling digital transformation with MySQL
Enabling digital transformation with MySQLEnabling digital transformation with MySQL
Enabling digital transformation with MySQLMySQL Brasil
 
Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7MySQL Brasil
 
NoSQL no MySQL 5.7
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7MySQL Brasil
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em StartupsMySQL Brasil
 
Estratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQLEstratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQLMySQL Brasil
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL Brasil
 
MySQL para Desenvolvedores de Produto
MySQL para Desenvolvedores de ProdutoMySQL para Desenvolvedores de Produto
MySQL para Desenvolvedores de ProdutoMySQL Brasil
 
MySQL Enterprise Edition Portfolio
MySQL Enterprise Edition PortfolioMySQL Enterprise Edition Portfolio
MySQL Enterprise Edition PortfolioMySQL Brasil
 
Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...
Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...
Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...MySQL Brasil
 

Mais de MySQL Brasil (18)

MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017MySQL como Document Store PHP Conference 2017
MySQL como Document Store PHP Conference 2017
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e Uber
 
MySQL 8.0.1 DMR
MySQL 8.0.1 DMRMySQL 8.0.1 DMR
MySQL 8.0.1 DMR
 
Alta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL EnterpriseAlta disponibilidade com MySQL Enterprise
Alta disponibilidade com MySQL Enterprise
 
MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17MySQL Roadmap NoSQL HA Fev17
MySQL Roadmap NoSQL HA Fev17
 
Segurança no MySQL
Segurança no MySQLSegurança no MySQL
Segurança no MySQL
 
5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL5 razões estratégicas para usar MySQL
5 razões estratégicas para usar MySQL
 
MySQL 5.7 como Document Store
MySQL 5.7 como Document StoreMySQL 5.7 como Document Store
MySQL 5.7 como Document Store
 
Enabling digital transformation with MySQL
Enabling digital transformation with MySQLEnabling digital transformation with MySQL
Enabling digital transformation with MySQL
 
Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7Alta Disponibilidade no MySQL 5.7
Alta Disponibilidade no MySQL 5.7
 
NoSQL no MySQL 5.7
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7
 
OpenStack & MySQL
OpenStack & MySQLOpenStack & MySQL
OpenStack & MySQL
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
 
Estratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQLEstratégias de Segurança e Gerenciamento para MySQL
Estratégias de Segurança e Gerenciamento para MySQL
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 
MySQL para Desenvolvedores de Produto
MySQL para Desenvolvedores de ProdutoMySQL para Desenvolvedores de Produto
MySQL para Desenvolvedores de Produto
 
MySQL Enterprise Edition Portfolio
MySQL Enterprise Edition PortfolioMySQL Enterprise Edition Portfolio
MySQL Enterprise Edition Portfolio
 
Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...
Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...
Architecture and Design MySQL powered applications by Peter Zaitsev Meetup Sa...
 

Mais performance com o MySQL 5.6

  • 1. Mais performance com MySQL 5.6 Airton Lastori 30-nov-2013
  • 2. Safe Harbour Statement 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 decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 3. Agenda  Melhorias no MySQL 5.6  Tuning do servidor  Índices eficientes  Visual EXPLAIN  Performance Schema 3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 4. MySQL é estratégico para Oracle  Soluções Completas  #1 em todos os níveis da pilha  Cloud e On Premise  MySQL: Web, Mobile & Embedded  Investimentos na Engenharia do MySQL 4 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 5. Alguns clientes MySQL 5 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 6. Compromisso Oracle com MySQL https://blogs.oracle.com/MySQL/entry/mysql_connect_keynotes_and_news 6 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 7. @MySQLBR facebook.com/MySQLBR meetup.com/MySQL-BR 7 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | MySQLBR
  • 8. Melhorias no MySQL 5.6 8 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 9. Arquitetura MySQL Server Clients & Connectors Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl Clients and Apps mysqld Connection Pool, SQL Interface, Parser, Optimizer, Caches Enterprise Management Services and Utilities Storage Engines InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc… Filesystems, Files & Logs Data, Index, Logs… 9 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Backup & Recovery Monitor Workbench Utilities
  • 10. Default Storage Engine InnoDB 10 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 11. Storage Engines MyISAM InnoDB NDB Cluster ✖ ✔ ✔ Tabela Linha Linha Assíncrona ou Semi-síncrona Assíncrona ou Semi-síncrona, crash-safe Síncrona, Multi-master, crash-safe sem SPOF Foreign Keys ✖ ✔ ✔ Full-text indexes ✔ ✔ ✖ Compressão de dados somente Leitura ✔ ✖ Caches somente Índices Dados e Índices Dados e Índices Tipos de Dados e Índices Somente Tipos de Dados somente Tipos de Dados 256TB 64TB 384EB (~3TB em RAM) Transações Nível de Lock Replicação Suporte Geoespacial Limite de armazenamento dev.mysql.com/doc/refman/5.6/en/storage-engines.html 11 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 12. Evolução da escalabilidade do MySQL 2008 2009 2010 2013 até 4 CPU MySQL 5.0 até 16 CPU MySQL 5.1 até 32 CPU MySQL 5.5 até 48 CPU MySQL 5.6 MySQL AB Sun Oracle Atualize o MySQL e use InnoDB. 12 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 13. Performance MySQL 5.6: InnoDB SysBench Benchmarks Transações por Segundo MySQL 5.6 vs. 5.5 - Leituras (Linux) 18.000 16.000 14.000 12.000 10.000 8.000 6.000 4.000 2.000 0 MySQL 5.6.7 MySQL 5.5.28 32 64 128 Conexões 256 512 +234% Ganhos de Performance 13 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Oracle Linux 6 Intel(R) Xeon(R) E7540 x86_64 MySQL leveraging: - 48 of 96 available CPU threads - 2 GHz, 512GB RAM
  • 14. Performance MySQL 5.6: InnoDB SysBench Benchmarks Transações por Segundo MySQL 5.6 vs. 5.5 – Escritas+Leituras (Linux) 12.000 MySQL 5.6.7 10.000 8.000 6.000 MySQL 5.5.28 4.000 2.000 0 32 64 128 Conexões 256 512 +151% Ganhos de Performance 14 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Oracle Linux 6 Intel(R) Xeon(R) E7540 x86_64 MySQL leveraging: - 48 of 96 available CPU threads - 2 GHz, 512GB RAM
  • 15. MySQL Enterprise Scalability  Thread Pool Plug-In • • • • Adiciona mais inteligência ao modelo padrão de gerenciamento de threads – agrupa e reutiliza Modelo padrão, sem Thread Pool: 1 thread por conexão, performance excelente, mas limita a escalabilidade ao crescer o número de conexões de usuários Com Thread Pool: reúso de threds, escala o número de conexões de usuários mantendo os mesmos níveis de performance Implementado utilizando Thread Pool API Assegura desempenho melhor e sustentável, mesmo quando o número de usuários continua crescendo. 15 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 16. Thread Pool habilitado/desabilitado 60x Melhor Escalabilidade comThread Pool 16 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | MySQL 5.6.11 Oracle Linux 6.3, Unbreakable Kernel 2.6.32 4 sockets, 24 cores, 48 Threads Intel(R) Xeon(R) E7540 2GHz CPUs 512GB DDR3 RAM
  • 17. Thread Pool habilitado/desabilitado 18x Melhor Escalabilidade com Thread Pool 17 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | MySQL 5.6.11 Oracle Linux 6.3, Unbreakable Kernel 2.6.32 4 sockets, 24 cores, 48 Threads Intel(R) Xeon(R) E7540 2GHz CPUs 512GB DDR3 RAM
  • 18. Otimizador do MySQL 5.6 Resolução de problemas com Subqueries SELECT title FROM film WHERE film_id IN (SELECT film_id FROM film_actor GROUP BY film_id HAVING count(*) > 12);  Sem necessidade de transformar em JOINs  Table pull-out  Semi-join  Subquery Materialization Tempo de execução baixou de DIAS para segundos Benchmark DBT3 Query #18 18 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 19. Otimizador do MySQL 5.6 Ordenação de arquivo com limites pequenos CREATE TABLE products( productid int auto_increment PRIMARY KEY, productname varchar(200)‫‏‬ ); SELECT * FROM products ORDER BY productname LIMIT 100;  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 4x mais rápido: caiu de 40s para 10s 19 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 20. Otimizador do MySQL 5.6 ICP: Index Condition Pushdown 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; pe test r 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) 90ms em ambos = melhoria de 15x a 170x em ambas configurações de buffer pool 20 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 21. Otimizador do MySQL 5.6 Postpone Materialization EXPLAIN SELECT * FROM (SELECT * FROM a_big_table); SELECT … FROM derived_table AS dt join table AS t WHERE dt.fld = t.dlf  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 240x mais rápido: caiu de ~8min para ~2s 21 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 22. Otimizador do MySQL 5.6 Batched Key Access (BKA) and Multi-Range Read (MRR) Melhora performance de JOINs 5000 2821 DBT3 Query 13: “Customer Distribution Query” Query Time (secs) 1225 500 No BKA BKA 50 9.63 5 0 8 16 24 32 40 Join Buffer Size (MB) 22 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | 48 56 64 290x mais rápido
  • 23. Otimizador do MySQL 5.6 Melhor intrumentação para diagnósticos  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; 23 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 24. Otimizador do MySQL 5.6 Melhorias na inicialização e estabilização  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 [mysqld] innodb_stats_persistent = 1 24 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | # use ANALYZE TABLE periodicamente para todas tabelas
  • 25. Mais Instrumentação no MySQL 5.6 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 25 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 26. Outras melhorias no MySQL 5.6 Mais facilidade de uso e flexibilidade  Novas configurações padrão, mais adequadas ao hardware atual  Particionamento melhorado  import/export  mais capacidade e performance  seleção explícita  Backup remoto do Binlog  Slaves com atraso programado  Identificador único universal para servidor (server UUID)  TIME/TIMESTAMP/DATETIME  precisão de fração de segundo  CURRENT_TIMESTAMP default /auto update  TIMESTAMP nullable por padrão  GIS: operações espaciais precisas  E MAIS... 26 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | mysql.com/why-mysql/white-papers/whats-new-mysql-5-6
  • 27. Tuning do MySQL Server 27 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 28. O loop infinito do tuning... Monitoramento etc... Melhorias 28 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Tuning Otimizações
  • 29. O loop infinito do tuning... Monitoramento etc... Melhorias 29 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Em mais de 90% dos casos o problema está na aplicação Tuning Otimizações
  • 30. Sistema Operacional  Linux – Usar malloc() lib jemalloc  Oracle Solaris – Usar malloc() lib libumem  Microsoft Windows http://www.mysql.com/support/supportedplatforms/database.html 30 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 31. O hardware ideal para o MySQL Server  Até 64 CPU threads x86-64 bit (requer MySQL 5.6 ou superior)  RAM igual ou maior que dataset “mais quente” (acessado com maior frequência)  2 x placas de rede  2 x fontes de alimentação 31 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 32. O hardware ideal para o MySQL Server  Mínimo de 4 x SSDs ou HDDs. 8–16 drives aumentarão a performance para cargas de I/O intensivo – Hardware RAID com battery-backed cache – RAID 10 recomendado; RAID 5 está OK se carga de leitura intensiva  Rede redundante  Alimentação redundante 32 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 33. Performance Tuning do MySQL Server  Principal dica: use seu cérebro!  Receitas de bolo são limitidas, o contexto muda tudo  Treinamento oficial 4 dias, education.oracle.com/mysql …esta apresentação: 50min!  Regras básicas – Nunca faça mudanças diretamente em produção – Tenha um bom método de benchmark ou carga regular – Tenha as métricas iniciais (baseline) e vá ajustando até conseguir seu objetivo; monitore e saiba quando parar – Apenas 1 mudança de cada vez 33 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 34. Benchmark  mysqlslap http://dev.mysql.com/doc/refman/5.6/en/mysqlslap.html  supersmack http://vegan.net/tony/supersmack  mybench http://jeremy.zawodny.com/mysql/mybench  SysBench http://sysbench.sourceforge.net  DBT2 http://osdldbt.sourceforge.net/  Faça você mesmo: – general query log output (table/file) – – JMeter, LoadRunner, Visual Studio 34 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 35. Monitoramento  Monitore, documente e salve os resultados  Métricas de Query – throughput – single query time – average query time  Métricas CPU: top, vmstat  Métricas IO: iostat, top, vmstat, bonnie++  Ferramentas: MySQL Enterprise Monitor, slow query log, status variables, Performance_Schema, etc. 35 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 36. 36 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 37. 37 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 38. Variáveis  Configure as System Variables (aka Options) – ex. datadir, port, innodb_buffer_pool_size – my.cnf ou linha de comando – SHOW <GLOBAL/SESSION> VARIABLES – Algumas Dínamicas (altere via comando SET); outras podem precisar de inicialização:  Monitore as Status Variables – SHOW <GLOBAL/SESSION> STATUS VARIABLES – mysqladmin ext -ri10 > arquivo.txt http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html http://dev.mysql.com/doc/refman/5.6/en/server-status-variables.html http://dev.mysql.com/doc/mysqld-version-reference/en/index.html 38 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 39. System Variables / Options  5.6 – Updated Defaults for Modern Systems – Auto-sized Variables  Prior to 5.6 – Out-of-date Configuration File Samples  example: my-innodb-heavy-4G.cnf  Advice: – Consider 5.6 Defaults – Re-evaluate older config file entries 39 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 40. Tuning do InnoDB Monitore • innodb_buffer_pool_reads • innodb_buffer_pool_read_requests • mysql> show status like 'Innodb_buffer%' ; 40 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Tune • innodb_buffer_pool_size • por volta de 80% da memória disponível • innodb_log_file_size = ~512MB 5.5+ • tradeoff: tempo de recuperação vs. performance • Muitas escritas
  • 41. Tuning do InnoDB, próximo nível depende do seu workload  innodb_flush_log_at_trx_commit (cuidado!) – valor 1: sync para arquivo (fsync) a cada commit – valores 0/2: pode perder 1 segundo de dados  innodb_flush_method = O_Direct – Depende do workload e hardware  innodb_buffer_pool_instances = 8 – Somente 5.5 e 5.6 http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html 41 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 42. Tuning do MyISAM Monitore • key_read_requests • key_reads • key_buffer_size Tune • Caches • key_buffer_cache – 25% da memória disponível • System Cache – 75% da memória disponível • Múltiplos Key Buffers • Pré-carregamento de Key Buffers http://dev.mysql.com/doc/refman/5.6/en/myisam-key-cache.html 42 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 43. Query Cache depende do seu workload Monitore • have_query_cache • qcache_hits • qcache_inserts • qcache_not_cached • qcache_total_blocks • qcache_free_memory 43 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Tune • Use apenas quando: • Queries e ResultSets são idênticos • Poucos Inserts/Updates/Deletes • query_cache_type • 0 ou OFF • 1 ou ON tudo, exceto hints SELECT SQL_NO_CACHE • 2 or DEMAND nada, exceto hint SELECT SQL_CACHE
  • 44. Tabelas Temporárias cuidado com consumo excessivo de RAM Monitore • created_tmp_tables • created_tmp_disk_tables Tune • tmp_table_size • tamanho máximo para tabelas “in memory” • Se temporary table > • tmp_table_size || max_heap_table_size || BLOB/TEXT • Então converte para tabela MyISAM em disco http://dev.mysql.com/doc/refman/5.6/en/internal-temporary-tables.html 44 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 45. Outras variáveis de uso geral 1 normalmente passam por tuning Monitore • %opened% • %thread% • threads_created 45 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Tune • table_open_cache • 5.6 mudou default de 400 - 2000 • thread_cache_size • meta threads_created ~ thread_cache_size
  • 46. Outras variáveis de uso geral 2 cuidado com tamanhos maiores Monitore • %opened% • %thread% • threads_created Depende do workload ou query Maior nem sempre é melhor Usa memória por Thread ou JOIN Tune • sort_buffer_size • sorting for group by and order by • If 100M = 100M of RAM per sort • mixed results in lab • 2M -> 256K in 5.6 Dicas: •Comece com o default vá alterando gradualmente •Ajuste dinamicamente 46 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 47. Outras variáveis de uso geral 3 cuidado com tamanhos maiores Monitore • select_full_join Depende do workload ou query Maior nem sempre é melhor Usa memória por Thread ou JOIN Tune • join_buffer_size • JOINS que não usam indices • Alocado por JOIN por thread! Dicas: •Comece com o default vá alterando gradualmente •Ajuste dinamicamente •Invista na otimização da Query 47 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 48. Resumo Menos tuning é necessário com defaults do MySQL 5.6 Tuning obrigatório:  thread_cache_size 0->8+max_con/100  InnoDB Buffer Pool  query cache  Key Buffer Cache (MyISAM)  tmp_table_size Tune e Avalie resultados: Cuidado:  innodb_log_file_size 5M->48M  sort_buffer_size 2MB->256K  innodb_flush_log_at_trx_commit  join_buffer_size 128K->256K  innodb_flush_method  read_buffer_size (MyISAM)  innodb_buffer_pool_instances 1->8  read_rnd_buffer_size  table_open_cache 400->2000 http://blogs.oracle.com/supportingmysql/entry/server_defaults_changes_in_mysql 49 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 49. Índices eficientes 50 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 50. 51 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 51. 52 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 52. 53 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 53. 54 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 54. 55 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 55. 56 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 56. 57 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 57. 58 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 58. 59 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 59. 60 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 60. Visual EXPLAIN 61 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 61. 62 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 62. 63 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 63. 64 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 64. 65 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 65. 66 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 66. 67 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 67. 68 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 68. Performance Schema 70 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 69. 71 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 70. 72 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 71. 73 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 72. 74 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 73. 75 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 74. Considere MySQL Enterprise para implementar boas práticas 77 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 75. Binários MySQL comunidade Pacote Enterprise: Suporte + Backup + Monitor & Workbench Suporte Plug-ins Backup Monitor & Workbench 78 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 76. Binários MySQL comerciais Certificado no stack Oracle + patches e hotfixes Suporte Escalabilidade Segurança Auditoria Plug-ins Backup Monitor & Workbench 79 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 77. MySQL Cluster Carrier-Grade Edition Subscrição com renovação anual: ferramentas + serviços Gerenciamento Consolidado Cluster Manager Plug-ins Suporte Cluster Monitor & Workbench 80 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Backup
  • 78. 84 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 79. MySQL Enterprise Backup          Backup online para InnoDB Backups completos, incrementais, parciais (automatizados via script) Compressão Opções de Recovery: Point in Time, Completo, Parcial Metadados de status, progresso e histórico mysqlbackup Tamanho ilimitado do BD Multi-Plataforma MEB MySQL Backup Database Files Files Windows, Linux, Unix Certificado para Oracle Secure Backup, compatível SBT Backup e Recovery mais rápidos e online. 85 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 80. MySQL Enterprise Audit  Audit Plug-In • Registro de conexões, logins, queries dos servidores MySQL • Políticas definidas pelo DBA para filtragem e rotação de logs • Habilitado ou desabilitado dinamicamente, sem reiniciar o servidor • Log em XML de acordo com especificação padrão Oracle Audit • Requer MySQL 5.5.28 ou superior • Implementado através MySQL 5.5 Audit API Adiciona conformidade regulatória em aplicações MySQL: HIPAA, Sarbanes-Oxley, PCI, etc. 86 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 81. MySQL Enterprise Audit 3. Conexões e queries dos usuários aparecem no log 1. DBA habilita no Server1 Server1 2. Usuário conecta-se e executa queries 87 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 82. MySQL Enterprise Security External Authentication Plug-Ins  PAM (Pluggable Authentication Modules) Plug-In • • • Autenticação externa via métodos externos Interface padrão, funciona com Unix, LDAP, Kerberos, outros Proxy-users – mapeamento grupos de usuários para 1 usuário  Windows Plug-In • • • Acesso nativo via serviços do Windows Autentica usuários já logados no Windows (Single Sign On) Grupos/usuários do Windows Active Directory com Proxy-users Integra o MySQL com a infraestrutura de segurança existente e SOPs. Mais produtividade na gestão de usuários. 88 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 83. MySQL Enterprise Security External Authentication Plug-Ins Usuário/senha definidos no diretório Privilégios definidos no MySQL e mapeados para usuários/grupos do diretório PAM / Windows Auth LDAP/AD Authenticate CREATE USER win_joe IDENTIFIED WITH authentication_windows AS ‘joe'; 89 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 84. Conclusão  MySQL 5.6, várias melhorias na performance  Sobre tuning: metodologia e outros componentes da pilha  Tuning do MySQL 5.6 – Variáveis – Índices – Visual Explain e Performance Schema  MySQL Enterprise 90 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 85. Saiba Mais  Treinamento oficial MySQL Performance Tuning http://education.oracle.com/mysql  Performance Tuning Webinars http://www.mysql.com/news-and-events/on-demand-webinars  MySQL Performance Forum http://forums.mysql.com/list.php?24  Download MySQL 5.6 http://www.mysql.com/downloads/mysql  MySQL Enterprise Monitor (trial 30 dias) http://www.mysql.com/trials 91 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. |
  • 86. @MySQLBR facebook.com/MySQLBR meetup.com/MySQL-BR 92 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. | Obrigado!
  • 87. Mais performance com MySQL 5.6 Perguntas?