SlideShare uma empresa Scribd logo
Greenplum: O banco de dados open source massivamente paralelo baseado em PostgreSQL | Luis Macedo
2© 2016 Pivotal Software, Inc. All rights reserved. 2
Conhecendo o Greenplum
O banco de dados Open Source massivamente
paralelo baseado em PostgreSQL
Luis Macedo
Arquiteto de Plataforma
3© 2016 Pivotal Software, Inc. All rights reserved.
Quem sou eu?
Ÿ  Bacharel em Física – USP
Ÿ  11 anos de experiência com VLDBs
Ÿ  Trabalhei nos projetos de DWH Telefonica,
Oi, Vivo e TIM
Ÿ  Projetos de Big Data e Hadoop na TIM e
Bradesco
Ÿ  Foco recente em plataformas de Nuvem
4© 2016 Pivotal Software, Inc. All rights reserved.
Powering Digital Transformation
A Pivotal ajuda empresas a prover a
melhor experiência a seus clientes e
colaboradores se calcando em
softwares modernos
5© 2016 Pivotal Software, Inc. All rights reserved.
Introdução ao Greenplum DB
Arquitetura do GPDB
Greenplum <> PostgreSQL
Casos de Uso
6© 2016 Pivotal Software, Inc. All rights reserved. 6
Introdução ao GPDB
7© 2016 Pivotal Software, Inc. All rights reserved.
http://greenplum.org/
Intodução ao Greenplum Database
8© 2016 Pivotal Software, Inc. All rights reserved.
https://github.com/greenplum-db/gpdb
Intodução ao Greenplum Database
9© 2016 Pivotal Software, Inc. All rights reserved.
Intodução ao Greenplum Database
”Mudar para sempre o Data Warehousing oferecendo um sistema abrangente e
comprovado em código aberto”
•  Totalmente ACID Compliant
•  Focado em “Big Structured Data”
•  ANSI SQL Standard Compliant (PostgreSQL)
•  Solução de Sofware
•  Implementação em HW comodite, appliance ou em nuvem
•  15+ anos de P&D
•  Herança do PostgreSQL e Open Source
•  Mais de 1000+ clientes enterprise pelo mundo
10© 2016 Pivotal Software, Inc. All rights reserved.
Intodução ao Greenplum Database
11© 2016 Pivotal Software, Inc. All rights reserved.
Procedural Languages
•  C
•  pgSQL
•  R
•  Python
•  Java
•  Perl
PostGIS
Fuzzy String Functions
NJSQL
Not Just SQL
12© 2016 Pivotal Software, Inc. All rights reserved. 12
Arquitetura do GPDB
13© 2016 Pivotal Software, Inc. All rights reserved.
Arquitetura do Greenplum Database
Arquitetura MPP Shared Nothing
Ø  Master Host
Ø  Coordenador
Ø  Segment Host
Ø  Executor
Ø  Interconnect
Ø  Barramento de conexão entre
os servidores
Ø  Segment Instance
Ø  Similar ao processo postgres
Standby
Master
…
Master
Host
SQL
Interconnect
Segment Host
Segment Instance
Segment Instance
Segment Instance
Segment Instance
Segment Host
Segment Instance
Segment Instance
Segment Instance
Segment Instance
node1
Segment Host
Segment Instance
Segment Instance
Segment Instance
Segment Instance
node2
Segment Host
Segment Instance
Segment Instance
Segment Instance
Segment Instance
node3
Segment Host
Segment Instance
Segment Instance
Segment Instance
Segment Instance
nodeN
14© 2016 Pivotal Software, Inc. All rights reserved.
Bob 12
Steve 10
Jim 15
Carson 2
Madison 6
Thomas 8
Andrea 22
cookie_order
15© 2016 Pivotal Software, Inc. All rights reserved.
select * from cookie_order
where amt > 10
16© 2016 Pivotal Software, Inc. All rights reserved.
Arquitetura do Greenplum Database
Arquitetura MPP Shared Nothing
Ø  Carga e extração paralela
Ø  10+ TB/h taxa de carga
Ø  Escalabilidade linear
Ø  Sem necessidade de reorg ou
aregar intermediárias
Ø  Multiplas horigens/destinos
Ø  Hadoop, FS, S3 External
Sources
Loading, streaming,
etc.
gNet Network
Interconnect
... ...
......
Master
Servers
Query planning &
dispatch
Segment
Servers
Query processing &
data storage
SQL
ETL
File
Systems
17© 2016 Pivotal Software, Inc. All rights reserved.
Arquitetura do Greenplum Database
Polymorfic Storage
•  Melhor performance de consultas
OLAP
•  Melhor Compressão
•  Vários níveis: quickLZ, zLib 1 a 9,
RLE
•  Melhor performance para
workloadas de pequenos inserts
•  Tabelas Heap tem melhor
performance para Upd/Del
Tabela ‘Vendas’
Jun
Orientado a ColunaOrientado a Linha
Out Ano
-1
Ano
-2
HDFS Externo
•  Dados Frios
•  Formatos: Texto, CSV,
Binario, Avro, Parquet
Nov DecJul Ago Set
18© 2016 Pivotal Software, Inc. All rights reserved.
Arquitetura do Greenplum Database
Alta Disponibilidade
Interconnect
Segment Host
Segment Instance
Segment Instance
Segment Instance
Segment Instance
Master HA
Segment HA
19© 2016 Pivotal Software, Inc. All rights reserved.
Arquitetura do Greenplum Database
Distribuição e Particionamento
Segment 1A Segment 1B Segment 1C Segment 1D
Segment 2A Segment 2B Segment 2C Segment 2D
Segment 3A Segment 3B Segment 3C Segment 3D
Segment 1A Segment 1B Segment 1C Segment 1D
Segment 2A Segment 2B Segment 2C Segment 2D
Segment 3A Segment 3B Segment 3C Segment 3D
Segment 1A Segment 1B Segment 1C Segment 1D
Segment 2A Segment 2B Segment 2C Segment 2D
Segment 3A Segment 3B Segment 3C Segment 3D
SELECT COUNT(*)
FROM orders
WHERE order_date >= ‘Oct 20 2007’
AND order_date < ‘Oct 27 2007’
&
As ordens estão distribuidas
nos segmentos
Somente as ordens das partições
qualificadas são escaneadas
Segment 1A Segment 1B Segment 1C Segment 1D
Segment 2A Segment 2B Segment 2C Segment 2D
Segment 3A Segment 3B Segment 3C Segment 3D
20© 2016 Pivotal Software, Inc. All rights reserved. 20
Greenplum <>
PostgreSQL
21© 2016 Pivotal Software, Inc. All rights reserved.
22© 2016 Pivotal Software, Inc. All rights reserved.
23© 2016 Pivotal Software, Inc. All rights reserved.
24© 2016 Pivotal Software, Inc. All rights reserved.
$ git diff --stat REL8_2_23..REL8_3_23
2423 files changed,
461334 insertions(+),
208900 deletions(-)
25© 2016 Pivotal Software, Inc. All rights reserved.
26© 2016 Pivotal Software, Inc. All rights reserved.
$ git merge upstream/REL8_3_STABLE
$ grep -r "<<<<<<< HEAD" . | wc -l
6653
27© 2016 Pivotal Software, Inc. All rights reserved.
28© 2016 Pivotal Software, Inc. All rights reserved.
Long Story Short… !
29© 2016 Pivotal Software, Inc. All rights reserved. 29
Caos de Uso ???Casos de Uso
30© 2016 Pivotal Software, Inc. All rights reserved.
“Next Best Action” – Engine de Recomendação
Cliente
Banco de varejo (EUA)
Problema de Negócio
Aumentar o mix de produtos financeiros adquiridos
pelos clientes em especial produtos de alto retorno
Desafios
▪  Com crescimento do volume de dados o ETL so
tornou um gargalo
▪  Dificuldade de evoluir os modelos estatísticos
com o alto volume de dados e ferrentas
tradicionais
Solução
▪  Trazer o ETL para ELT no Greenplum acelerando
a carga e preparação do dado
▪  Utilizar MADlib para criar novos modelos de “Next
best action” mais eficazes usando mais dados e
mais granular
▪  Utilizar novo modelo para operacionalizar açoes
de vendas otimizando o portifolio de cada gerente
Who? What? When? Where?
Next Best
Action
31© 2016 Pivotal Software, Inc. All rights reserved.
Análise de Falha Massiva - ANATEL
Cliente
Grande Telco Brasileira
Problema de Negócio
Quando ocorre uma falha de um equipamento de
rede e isto afeta uma região a ANATEL define uma
complexa regra de reembolso para os afetados.
Solução adotara era reemboçlar todos os clientes
da região no momento da falha.
Desafios
▪  Grande volume de dados não permitia a
aplicação da regra ANATEL
▪  Não havia dados nos sistemas legados
Solução
▪  Trazer todo dado de xDR para um Data Lake
▪  Criar listagem, cliente a cliente, aplicando a regra
da ANTEL
▪  Alimentar sistema de billing com reembolços
corretos
32© 2016 Pivotal Software, Inc. All rights reserved.
Prevenção a Evasão de Impostos
Cliente
Secretaria de Fazenda Estadual
Problema de Negócio
Com a digitalização das notas fiscais de compra e
venda o volume dados disponíveis para análise
cresceu muito abrindo espaço para uma
fiscalização mais estrita.
Desafios
▪  Volumes de dados não compatíveis com a arquitetura
SMP do SQLServer
▪  Cilos de dados (diferentes SQLServers)
▪  Processo de fraude demorava 2 meses para executar.
Solução
▪  Criar novo modelo de dados desnormalizado em
GPDB
▪  Criar novos algoritmos de prevenção a evasão de
impostos
▪  Sofisticar a análise e contemplar NF-e PF.
33© 2016 Pivotal Software, Inc. All rights reserved. 33
Concluindo…
34© 2016 Pivotal Software, Inc. All rights reserved.
!
35© 2016 Pivotal Software, Inc. All rights reserved.
TO BECOME A
HACKER
Greenplum: O banco de dados open source massivamente paralelo baseado em PostgreSQL | Luis Macedo

Mais conteúdo relacionado

PDF
Kubernetes: A Short Introduction (2019)
PDF
Monitoring microservices with Prometheus
PPTX
Introduction+to+Kubernetes-Details-D.pptx
PDF
IT Automation with Ansible
PPTX
Containerization and Docker
PPTX
Hdfs ha using journal nodes
PPTX
Big Data and Hadoop
PDF
Ansible
Kubernetes: A Short Introduction (2019)
Monitoring microservices with Prometheus
Introduction+to+Kubernetes-Details-D.pptx
IT Automation with Ansible
Containerization and Docker
Hdfs ha using journal nodes
Big Data and Hadoop
Ansible

Mais procurados (20)

PDF
Big Data technology Landscape
PDF
Kafka At Scale in the Cloud
PPTX
Hadoop technology
PPTX
Linux administration
PPTX
Introduction to ansible
PPTX
Group policy Best Practices
PPTX
Docker Swarm for Beginner
PDF
Apache KAfka
PPTX
Kafka Tutorial - DevOps, Admin and Ops
PDF
Using Docker Containers to Improve Reproducibility in Software and Web Engine...
ODP
Introduction to Red Hat
PPTX
Openstack zun,virtual kubelet
PPT
XPages Performance
PDF
확장가능한 웹 아키텍쳐 구축 방안
PPT
ACTIVE-DIRECTORY.ppt
PPTX
INTER PROCESS COMMUNICATION (IPC).pptx
PDF
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
PPTX
OpenStack Architecture and Use Cases
PPTX
Kafka monitoring using Prometheus and Grafana
PPTX
Automating with Ansible
Big Data technology Landscape
Kafka At Scale in the Cloud
Hadoop technology
Linux administration
Introduction to ansible
Group policy Best Practices
Docker Swarm for Beginner
Apache KAfka
Kafka Tutorial - DevOps, Admin and Ops
Using Docker Containers to Improve Reproducibility in Software and Web Engine...
Introduction to Red Hat
Openstack zun,virtual kubelet
XPages Performance
확장가능한 웹 아키텍쳐 구축 방안
ACTIVE-DIRECTORY.ppt
INTER PROCESS COMMUNICATION (IPC).pptx
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
OpenStack Architecture and Use Cases
Kafka monitoring using Prometheus and Grafana
Automating with Ansible
Anúncio

Destaque (20)

PDF
PostgreSQL: How to Store Passwords Safely
PDF
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
PPTX
2015 zData Inc. - Apache Ambari Overview
PDF
Bancos de dados analíticos open source
PPTX
Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...
PPT
יחידת הוראה לחנכה
PPTX
Greenplum Database Open Source December 2015
PPTX
5. pivotal hd 2013
ODP
Postgres Wonderland - PGDay Cascavél 2013
PDF
GSoC2014 - PGDay Ijui/RS Presentation October, 2016
PDF
Keep calm and Database Continuous Deployment
PDF
Sharing Code and Experiences
PDF
GSoC2014 - PGCon2015 Presentation June, 2015
PDF
Dojo plpgsql
PDF
Bad Smells (mal cheiros) em Bancos de Dados
PDF
Como posso colaborar com o PostgreSQL
PDF
GSoC2014 - Uniritter Presentation May, 2015
PDF
Planejador de Consultas do PostgreSQL
PPTX
#PostgreSQLRussia в банке Тинькофф, доклад №1
PDF
Gerenciamento de Backup e Recovery com o Barman
PostgreSQL: How to Store Passwords Safely
DevOps e PostgreSQL: Replicação de forma simplificada | Miguel Di Ciurcio
2015 zData Inc. - Apache Ambari Overview
Bancos de dados analíticos open source
Курс лекций на программу МВА в РУДН 16 февраля 2016 Тема "Управление изменени...
יחידת הוראה לחנכה
Greenplum Database Open Source December 2015
5. pivotal hd 2013
Postgres Wonderland - PGDay Cascavél 2013
GSoC2014 - PGDay Ijui/RS Presentation October, 2016
Keep calm and Database Continuous Deployment
Sharing Code and Experiences
GSoC2014 - PGCon2015 Presentation June, 2015
Dojo plpgsql
Bad Smells (mal cheiros) em Bancos de Dados
Como posso colaborar com o PostgreSQL
GSoC2014 - Uniritter Presentation May, 2015
Planejador de Consultas do PostgreSQL
#PostgreSQLRussia в банке Тинькофф, доклад №1
Gerenciamento de Backup e Recovery com o Barman
Anúncio

Semelhante a Greenplum: O banco de dados open source massivamente paralelo baseado em PostgreSQL | Luis Macedo (20)

PDF
Pentaho JUG Vale 2012
PDF
Arquitetando Soluções de Dados com PostgreSQL
PDF
Funcionalidades das versões 9.x do PostgreSQL
PDF
Big data e PostgreSQL
PPTX
AWS Initiate - Construindo Data Lakes e Analytics com AWS
PDF
AWS Innovate 2020 - Entenda como o Data Flywheel pode apoiá-lo em sua estraté...
PPTX
Pgday Campinas 2015 - Uma visão do PPAS 9.4 e PEM 5.0
PPTX
Pgday Campinas 2015 - Uma visão do PPAS 9.4 e PEM 5.0
PDF
PostgreSQL em projetos de Business Analytics e Big Data Analytics com Pentaho
PDF
Modelagem de dados para aplicação de business analytics
PPTX
SQL SAT Salvador - Arquitetando Data Lake Multicloud
PPTX
Cenário das Plataformas de Dados 2017/2018
PPTX
24HoP 2012 - E você, está preparado para a era BigData?
PDF
Web Scale Data Management
PPTX
ILM com PostgreSQL
PDF
Qual é o futuro da estratégia de dados?
PDF
Business Analytics
PDF
Como lidar com cargas de trabalho mistas - PostgreSQL
PPT
Dawarehouse e OLAP
PDF
Pentaho Hadoop Big Data e Data Lakes
Pentaho JUG Vale 2012
Arquitetando Soluções de Dados com PostgreSQL
Funcionalidades das versões 9.x do PostgreSQL
Big data e PostgreSQL
AWS Initiate - Construindo Data Lakes e Analytics com AWS
AWS Innovate 2020 - Entenda como o Data Flywheel pode apoiá-lo em sua estraté...
Pgday Campinas 2015 - Uma visão do PPAS 9.4 e PEM 5.0
Pgday Campinas 2015 - Uma visão do PPAS 9.4 e PEM 5.0
PostgreSQL em projetos de Business Analytics e Big Data Analytics com Pentaho
Modelagem de dados para aplicação de business analytics
SQL SAT Salvador - Arquitetando Data Lake Multicloud
Cenário das Plataformas de Dados 2017/2018
24HoP 2012 - E você, está preparado para a era BigData?
Web Scale Data Management
ILM com PostgreSQL
Qual é o futuro da estratégia de dados?
Business Analytics
Como lidar com cargas de trabalho mistas - PostgreSQL
Dawarehouse e OLAP
Pentaho Hadoop Big Data e Data Lakes

Mais de PGDay Campinas (10)

PDF
PgBouncer: Pool, Segurança e Disaster Recovery | Felipe Pereira
PDF
PGDay Campinas 2013 - Mineração de Dados com MADlib
PDF
PGDay Campinas 2013 - Como Full Text Search pode ajudar na busca textual
PDF
PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...
PDF
PGDay Campinas 2013 - Postgres XC @ Cloud
PDF
PGDay Campinas 2013 - CASE: PostgreSQL no Tribunal de Justiça do Paraná
PDF
PGDay Campinas 2013 - Implementando o PostgreSQL de maneira escalável e com a...
PDF
PGDay Campinas 2013 - Window Function e CTE – Surpreendente
PPSX
CASE: O PostgreSQL em BI: Milhares de operações diárias consolidadas em "near...
PDF
Jaime Casanova - Domando a la bestia Replicación
PgBouncer: Pool, Segurança e Disaster Recovery | Felipe Pereira
PGDay Campinas 2013 - Mineração de Dados com MADlib
PGDay Campinas 2013 - Como Full Text Search pode ajudar na busca textual
PGDay Campinas 2013 - PL/pg…ETL – Transformação de dados para DW e BI usando ...
PGDay Campinas 2013 - Postgres XC @ Cloud
PGDay Campinas 2013 - CASE: PostgreSQL no Tribunal de Justiça do Paraná
PGDay Campinas 2013 - Implementando o PostgreSQL de maneira escalável e com a...
PGDay Campinas 2013 - Window Function e CTE – Surpreendente
CASE: O PostgreSQL em BI: Milhares de operações diárias consolidadas em "near...
Jaime Casanova - Domando a la bestia Replicación

Último (19)

PDF
Fullfilment AI - Forum ecommerce 2025 // Distrito e Total Express
PDF
Mergulho profundo técnico para gestão de transportes no SAP S/4HANA, S4TM6 Col14
PPTX
Programação - Linguagem C - Variáveis, Palavras Reservadas, tipos de dados, c...
PPTX
Aula 18 - Manipulacao De Arquivos python
PDF
Fundamentos de gerenciamento de ordens e planejamento no SAP TransportationMa...
PDF
Custos e faturamento no SAP S/4HANA Transportation Management, S4TM3 Col26
PDF
Custos e liquidação no SAP Transportation Management, TM130 Col18
PDF
Processos na gestão de transportes, TM100 Col18
PPTX
Aula16ManipulaçãoDadosssssssssssssssssssssssssssss
PPTX
Informática Aplicada Informática Aplicada Plano de Ensino - estudo de caso NR...
PPTX
BANCO DE DADOS - AULAS INICIAIS-sgbd.pptx
PDF
Otimizador de planejamento e execução no SAP Transportation Management, TM120...
PDF
Aula04-Academia Heri- Tecnologia Geral 2025
PDF
COBITxITIL-Entenda as diferença em uso governança TI
PDF
Apple Pippin Uma breve introdução. - David Glotz
PPTX
Gestao-de-Bugs-em-Software-Introducao.pptxxxxxxxx
PDF
Gestão de transportes básica no SAP S/4HANA, S4611 Col20
PDF
20250805_ServiceNow e a Arquitetura Orientada a Serviços (SOA) A Base para Ap...
PPTX
Como-se-implementa-um-softwareeeeeeeeeeeeeeeeeeeeeeeee.pptx
Fullfilment AI - Forum ecommerce 2025 // Distrito e Total Express
Mergulho profundo técnico para gestão de transportes no SAP S/4HANA, S4TM6 Col14
Programação - Linguagem C - Variáveis, Palavras Reservadas, tipos de dados, c...
Aula 18 - Manipulacao De Arquivos python
Fundamentos de gerenciamento de ordens e planejamento no SAP TransportationMa...
Custos e faturamento no SAP S/4HANA Transportation Management, S4TM3 Col26
Custos e liquidação no SAP Transportation Management, TM130 Col18
Processos na gestão de transportes, TM100 Col18
Aula16ManipulaçãoDadosssssssssssssssssssssssssssss
Informática Aplicada Informática Aplicada Plano de Ensino - estudo de caso NR...
BANCO DE DADOS - AULAS INICIAIS-sgbd.pptx
Otimizador de planejamento e execução no SAP Transportation Management, TM120...
Aula04-Academia Heri- Tecnologia Geral 2025
COBITxITIL-Entenda as diferença em uso governança TI
Apple Pippin Uma breve introdução. - David Glotz
Gestao-de-Bugs-em-Software-Introducao.pptxxxxxxxx
Gestão de transportes básica no SAP S/4HANA, S4611 Col20
20250805_ServiceNow e a Arquitetura Orientada a Serviços (SOA) A Base para Ap...
Como-se-implementa-um-softwareeeeeeeeeeeeeeeeeeeeeeeee.pptx

Greenplum: O banco de dados open source massivamente paralelo baseado em PostgreSQL | Luis Macedo

  • 2. 2© 2016 Pivotal Software, Inc. All rights reserved. 2 Conhecendo o Greenplum O banco de dados Open Source massivamente paralelo baseado em PostgreSQL Luis Macedo Arquiteto de Plataforma
  • 3. 3© 2016 Pivotal Software, Inc. All rights reserved. Quem sou eu? Ÿ  Bacharel em Física – USP Ÿ  11 anos de experiência com VLDBs Ÿ  Trabalhei nos projetos de DWH Telefonica, Oi, Vivo e TIM Ÿ  Projetos de Big Data e Hadoop na TIM e Bradesco Ÿ  Foco recente em plataformas de Nuvem
  • 4. 4© 2016 Pivotal Software, Inc. All rights reserved. Powering Digital Transformation A Pivotal ajuda empresas a prover a melhor experiência a seus clientes e colaboradores se calcando em softwares modernos
  • 5. 5© 2016 Pivotal Software, Inc. All rights reserved. Introdução ao Greenplum DB Arquitetura do GPDB Greenplum <> PostgreSQL Casos de Uso
  • 6. 6© 2016 Pivotal Software, Inc. All rights reserved. 6 Introdução ao GPDB
  • 7. 7© 2016 Pivotal Software, Inc. All rights reserved. http://greenplum.org/ Intodução ao Greenplum Database
  • 8. 8© 2016 Pivotal Software, Inc. All rights reserved. https://github.com/greenplum-db/gpdb Intodução ao Greenplum Database
  • 9. 9© 2016 Pivotal Software, Inc. All rights reserved. Intodução ao Greenplum Database ”Mudar para sempre o Data Warehousing oferecendo um sistema abrangente e comprovado em código aberto” •  Totalmente ACID Compliant •  Focado em “Big Structured Data” •  ANSI SQL Standard Compliant (PostgreSQL) •  Solução de Sofware •  Implementação em HW comodite, appliance ou em nuvem •  15+ anos de P&D •  Herança do PostgreSQL e Open Source •  Mais de 1000+ clientes enterprise pelo mundo
  • 10. 10© 2016 Pivotal Software, Inc. All rights reserved. Intodução ao Greenplum Database
  • 11. 11© 2016 Pivotal Software, Inc. All rights reserved. Procedural Languages •  C •  pgSQL •  R •  Python •  Java •  Perl PostGIS Fuzzy String Functions NJSQL Not Just SQL
  • 12. 12© 2016 Pivotal Software, Inc. All rights reserved. 12 Arquitetura do GPDB
  • 13. 13© 2016 Pivotal Software, Inc. All rights reserved. Arquitetura do Greenplum Database Arquitetura MPP Shared Nothing Ø  Master Host Ø  Coordenador Ø  Segment Host Ø  Executor Ø  Interconnect Ø  Barramento de conexão entre os servidores Ø  Segment Instance Ø  Similar ao processo postgres Standby Master … Master Host SQL Interconnect Segment Host Segment Instance Segment Instance Segment Instance Segment Instance Segment Host Segment Instance Segment Instance Segment Instance Segment Instance node1 Segment Host Segment Instance Segment Instance Segment Instance Segment Instance node2 Segment Host Segment Instance Segment Instance Segment Instance Segment Instance node3 Segment Host Segment Instance Segment Instance Segment Instance Segment Instance nodeN
  • 14. 14© 2016 Pivotal Software, Inc. All rights reserved. Bob 12 Steve 10 Jim 15 Carson 2 Madison 6 Thomas 8 Andrea 22 cookie_order
  • 15. 15© 2016 Pivotal Software, Inc. All rights reserved. select * from cookie_order where amt > 10
  • 16. 16© 2016 Pivotal Software, Inc. All rights reserved. Arquitetura do Greenplum Database Arquitetura MPP Shared Nothing Ø  Carga e extração paralela Ø  10+ TB/h taxa de carga Ø  Escalabilidade linear Ø  Sem necessidade de reorg ou aregar intermediárias Ø  Multiplas horigens/destinos Ø  Hadoop, FS, S3 External Sources Loading, streaming, etc. gNet Network Interconnect ... ... ...... Master Servers Query planning & dispatch Segment Servers Query processing & data storage SQL ETL File Systems
  • 17. 17© 2016 Pivotal Software, Inc. All rights reserved. Arquitetura do Greenplum Database Polymorfic Storage •  Melhor performance de consultas OLAP •  Melhor Compressão •  Vários níveis: quickLZ, zLib 1 a 9, RLE •  Melhor performance para workloadas de pequenos inserts •  Tabelas Heap tem melhor performance para Upd/Del Tabela ‘Vendas’ Jun Orientado a ColunaOrientado a Linha Out Ano -1 Ano -2 HDFS Externo •  Dados Frios •  Formatos: Texto, CSV, Binario, Avro, Parquet Nov DecJul Ago Set
  • 18. 18© 2016 Pivotal Software, Inc. All rights reserved. Arquitetura do Greenplum Database Alta Disponibilidade Interconnect Segment Host Segment Instance Segment Instance Segment Instance Segment Instance Master HA Segment HA
  • 19. 19© 2016 Pivotal Software, Inc. All rights reserved. Arquitetura do Greenplum Database Distribuição e Particionamento Segment 1A Segment 1B Segment 1C Segment 1D Segment 2A Segment 2B Segment 2C Segment 2D Segment 3A Segment 3B Segment 3C Segment 3D Segment 1A Segment 1B Segment 1C Segment 1D Segment 2A Segment 2B Segment 2C Segment 2D Segment 3A Segment 3B Segment 3C Segment 3D Segment 1A Segment 1B Segment 1C Segment 1D Segment 2A Segment 2B Segment 2C Segment 2D Segment 3A Segment 3B Segment 3C Segment 3D SELECT COUNT(*) FROM orders WHERE order_date >= ‘Oct 20 2007’ AND order_date < ‘Oct 27 2007’ & As ordens estão distribuidas nos segmentos Somente as ordens das partições qualificadas são escaneadas Segment 1A Segment 1B Segment 1C Segment 1D Segment 2A Segment 2B Segment 2C Segment 2D Segment 3A Segment 3B Segment 3C Segment 3D
  • 20. 20© 2016 Pivotal Software, Inc. All rights reserved. 20 Greenplum <> PostgreSQL
  • 21. 21© 2016 Pivotal Software, Inc. All rights reserved.
  • 22. 22© 2016 Pivotal Software, Inc. All rights reserved.
  • 23. 23© 2016 Pivotal Software, Inc. All rights reserved.
  • 24. 24© 2016 Pivotal Software, Inc. All rights reserved. $ git diff --stat REL8_2_23..REL8_3_23 2423 files changed, 461334 insertions(+), 208900 deletions(-)
  • 25. 25© 2016 Pivotal Software, Inc. All rights reserved.
  • 26. 26© 2016 Pivotal Software, Inc. All rights reserved. $ git merge upstream/REL8_3_STABLE $ grep -r "<<<<<<< HEAD" . | wc -l 6653
  • 27. 27© 2016 Pivotal Software, Inc. All rights reserved.
  • 28. 28© 2016 Pivotal Software, Inc. All rights reserved. Long Story Short… !
  • 29. 29© 2016 Pivotal Software, Inc. All rights reserved. 29 Caos de Uso ???Casos de Uso
  • 30. 30© 2016 Pivotal Software, Inc. All rights reserved. “Next Best Action” – Engine de Recomendação Cliente Banco de varejo (EUA) Problema de Negócio Aumentar o mix de produtos financeiros adquiridos pelos clientes em especial produtos de alto retorno Desafios ▪  Com crescimento do volume de dados o ETL so tornou um gargalo ▪  Dificuldade de evoluir os modelos estatísticos com o alto volume de dados e ferrentas tradicionais Solução ▪  Trazer o ETL para ELT no Greenplum acelerando a carga e preparação do dado ▪  Utilizar MADlib para criar novos modelos de “Next best action” mais eficazes usando mais dados e mais granular ▪  Utilizar novo modelo para operacionalizar açoes de vendas otimizando o portifolio de cada gerente Who? What? When? Where? Next Best Action
  • 31. 31© 2016 Pivotal Software, Inc. All rights reserved. Análise de Falha Massiva - ANATEL Cliente Grande Telco Brasileira Problema de Negócio Quando ocorre uma falha de um equipamento de rede e isto afeta uma região a ANATEL define uma complexa regra de reembolso para os afetados. Solução adotara era reemboçlar todos os clientes da região no momento da falha. Desafios ▪  Grande volume de dados não permitia a aplicação da regra ANATEL ▪  Não havia dados nos sistemas legados Solução ▪  Trazer todo dado de xDR para um Data Lake ▪  Criar listagem, cliente a cliente, aplicando a regra da ANTEL ▪  Alimentar sistema de billing com reembolços corretos
  • 32. 32© 2016 Pivotal Software, Inc. All rights reserved. Prevenção a Evasão de Impostos Cliente Secretaria de Fazenda Estadual Problema de Negócio Com a digitalização das notas fiscais de compra e venda o volume dados disponíveis para análise cresceu muito abrindo espaço para uma fiscalização mais estrita. Desafios ▪  Volumes de dados não compatíveis com a arquitetura SMP do SQLServer ▪  Cilos de dados (diferentes SQLServers) ▪  Processo de fraude demorava 2 meses para executar. Solução ▪  Criar novo modelo de dados desnormalizado em GPDB ▪  Criar novos algoritmos de prevenção a evasão de impostos ▪  Sofisticar a análise e contemplar NF-e PF.
  • 33. 33© 2016 Pivotal Software, Inc. All rights reserved. 33 Concluindo…
  • 34. 34© 2016 Pivotal Software, Inc. All rights reserved. !
  • 35. 35© 2016 Pivotal Software, Inc. All rights reserved. TO BECOME A HACKER