Acesso ao banco é crítico nos projetos. É fácil derrubar a performance com consultas pesadas. E tudo fica pior se o banco de dados tem muita informação, ou se uma consulta for mal planejada!
Um agravante nesta situação: como testar em cenários próximos ao real e de forma produtiva? Nesta palestra você vai melhorar seu relacionamento com o banco de dados aprendendo um poderoso recurso pouco utilizado pelos desenvolvedores e também como testar suas consultas em um ambiente totalmente isolado, com apenas um comando.
Performance e Produtividade: 2 Habilidades para Transformar seu Relacionament...rcmoutinho
Acesso ao banco é crítico nos projetos. É fácil derrubar a performance com consultas pesadas. E tudo fica pior se o banco de dados tem muita informação, ou se por uma consulta mal feita!
Um agravante neste situação: como testar em cenários próximos ao real e de forma produtiva? Nesta palestra você vai melhorar seu relacionamento com o banco de dados aprendendo um poderoso recurso pouco utilizado pelos desenvolvedores e também como testar suas consultas em um ambiente totalmente isolado, com apenas um comando.
Dramatically increase your database's performance using hierarchical and recu...rcmoutinho
Database access is critical to any project. It's easy to low down the performance with heavy queries, or using multiple queries to get a simple information. Or even that initial query that cascade to dozens of others using programming... And everything gets worse if the database has lots of data or a poorly designed query! Each query has a high cost to your application. It's possible to solve this kind of problems using CTE (Common Table Expression). This powerful resource is available on most of the relational database but isn't well known by developers. Deal with a significant amount of data with simple maintenance and drastically increase your database performance!
wuqiSpank.org -- The First "Table Centric" Approach to Solving SQL Performan...Erik Ostermueller
"Too many calls to the database" is the #1 performance problem is server-side software.
wuqiSpank's unique "Table Centric" SQL visualizations show the repetitious SQL anti-patterns that kill system performance (like SELECT N+1).
In 2013, $2.4 Billion was spent on APM (Application Performance Monitoring) tools. None of them get to the heart of the problem like wuqiSpank.
See http://wuqiSpank.org for more.
Latin America Tour 2019 - 10 great sql featuresConnor McDonald
By expanding our knowledge of SQL facilities, we can let all the boring work be handled via SQL rather than a lot of middle-tier code, and we can get performance benefits as an added bonus. Here are some SQL techniques to solve problems that would otherwise require a lot of complex coding, freeing up your time to focus on the delivery of great applications.
Simplifying SQL with CTE's and windowing functionsClayton Groom
Too busy to learn the new capabilities of SQL Server? This session will cover several of the new features of the T-SQL language, specifically Common Table Expressions (CTE's) and Windowing Functions. This will be an code-heavy session with examples hat you can readily leverage in your solutions.
The focus will be on techniques to shape and manipulate your data for easier consumption by your application, and to leverage your SQL Server to avoid writing code in your application.
A basic to intermediate understanding of T-SQL is required.
Wellington APAC Groundbreakers tour - SQL Pattern MatchingConnor McDonald
Analytic functions that came way back in 8i are cool, but often we use them really to answer questions about the patterns that exist in data. So perhaps it is time for a new SQL syntax - one more closely aligned with finding patterns, rather than analytical computations. Enter the MATCH_RECOGNIZE syntax!
Performance e Produtividade: 2 Habilidades para Transformar seu Relacionament...rcmoutinho
Acesso ao banco é crítico nos projetos. É fácil derrubar a performance com consultas pesadas. E tudo fica pior se o banco de dados tem muita informação, ou se por uma consulta mal feita!
Um agravante neste situação: como testar em cenários próximos ao real e de forma produtiva? Nesta palestra você vai melhorar seu relacionamento com o banco de dados aprendendo um poderoso recurso pouco utilizado pelos desenvolvedores e também como testar suas consultas em um ambiente totalmente isolado, com apenas um comando.
Dramatically increase your database's performance using hierarchical and recu...rcmoutinho
Database access is critical to any project. It's easy to low down the performance with heavy queries, or using multiple queries to get a simple information. Or even that initial query that cascade to dozens of others using programming... And everything gets worse if the database has lots of data or a poorly designed query! Each query has a high cost to your application. It's possible to solve this kind of problems using CTE (Common Table Expression). This powerful resource is available on most of the relational database but isn't well known by developers. Deal with a significant amount of data with simple maintenance and drastically increase your database performance!
wuqiSpank.org -- The First "Table Centric" Approach to Solving SQL Performan...Erik Ostermueller
"Too many calls to the database" is the #1 performance problem is server-side software.
wuqiSpank's unique "Table Centric" SQL visualizations show the repetitious SQL anti-patterns that kill system performance (like SELECT N+1).
In 2013, $2.4 Billion was spent on APM (Application Performance Monitoring) tools. None of them get to the heart of the problem like wuqiSpank.
See http://wuqiSpank.org for more.
Latin America Tour 2019 - 10 great sql featuresConnor McDonald
By expanding our knowledge of SQL facilities, we can let all the boring work be handled via SQL rather than a lot of middle-tier code, and we can get performance benefits as an added bonus. Here are some SQL techniques to solve problems that would otherwise require a lot of complex coding, freeing up your time to focus on the delivery of great applications.
Simplifying SQL with CTE's and windowing functionsClayton Groom
Too busy to learn the new capabilities of SQL Server? This session will cover several of the new features of the T-SQL language, specifically Common Table Expressions (CTE's) and Windowing Functions. This will be an code-heavy session with examples hat you can readily leverage in your solutions.
The focus will be on techniques to shape and manipulate your data for easier consumption by your application, and to leverage your SQL Server to avoid writing code in your application.
A basic to intermediate understanding of T-SQL is required.
Wellington APAC Groundbreakers tour - SQL Pattern MatchingConnor McDonald
Analytic functions that came way back in 8i are cool, but often we use them really to answer questions about the patterns that exist in data. So perhaps it is time for a new SQL syntax - one more closely aligned with finding patterns, rather than analytical computations. Enter the MATCH_RECOGNIZE syntax!
Slides from OOW13
Its the age old problem. The SQL statement that needs to run in 5 seconds - unfortunately runs in 10 seconds, or 10 minutes, or 10 hours. A SQL statement gets emailed to you with the simple subject title: "Make it faster". We'll start from this point in the process, and look at what you can do to tackle this common issue.
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxgilpinleeanna
MSCD650 Final Exam feedback Form
MSCD650 Final Exam Grading Form
(Instructions follow the form)
Coding
55 Percent
Points Earned
Comments:
Trigger Code:
· Code meets requirements
· Code compiles cleanly
/15
Pre-Calculation Procedure Code
· Code meets requirements
· Code compiles cleanly
/15
PL/SQL Block Code
· Code meets requirements
· Code compiles cleanly
/15
Function Code
· Code meets requirements
· Code compiles cleanly
/10
/55
Unit Testing
35 Percent
Points Earned
Comments:
Unit Test for Trigger Code:
· All conditions are thoroughly tested
· The code runs successfully
· All data to prove test worked is displayed
/10
Unit Test for Procedure Code:
· All conditions are thoroughly tested
· The code runs successfully
· All data to prove test worked is displayed
· The tester can easily follow the path of the execution.
/10
.
Unit Test for PL/SQL Block Code:
· All conditions are thoroughly tested
· The code runs successfully
· All data to prove test worked is displayed
· The tester can easily follow the path of the execution.
/10
Unit Test for View/Function Code:
· All conditions are thoroughly tested
· The code runs successfully
· All data to prove test worked is displayed
· The tester can easily follow the path of the execution.
/5
/35
Documentation
10 Percent
Points Earned
Comments:
Presentation:
· The document is easy to read.
· The document is Professional in appearance
· It is easy for the reader to find what they are looking for.
/5
Documentation:
· Code is documented so that anyone who picks it up knows what it is doing.
/5
/10
Total 100
Percent
Points Earned
Comments:
Case Study
Overview of assignment
As a new ABC Consultant assigned to the XYZ Company, you have been asked to enhance the current system to include payroll processing. Although the current employee table has monthly salary and commission columns, it does not provide any means for storing employee deductions. You will add the tables necessary to store employee deductions. Next you will create a payroll pre-calculation program that will calculate the net pay for all the employees via a batch process (a stored procedure in a package, which will call other stored procedures within the package). Although this is not a complete payroll system, the unit test results must be accurate.
Next you will create two PL/SQL blocks for inserting and deleting rows from the employee deduction table. These PL/SQL blocks will be passed information from host or bind variables and a third PL/SQL block which will assign the variables defined in SQL*Plus (e.g. employee number, dollar amount and deduction name). Since the XYZ Company wants to track changes to the employee and employee deduction tables, you will create two database triggers that will update audit tables when rows are changed or deleted.
The XYZ Company also requires a view that will display specific employee information, plus the number of deductions for an employe ...
Airline scheduling and pricing using a genetic algorithmAlan Walker
Some of my earlier research work on "clean sheet" scheduling for airlines. AIrline timetables are generally created by hand, and then mathematical models are used to optimize and tweak them. This was the first published work in the industry for diong the whole process in one system. Combines a number of different airline operations research models into a single framework.
When the AA / Sabre Research Group was created, one of the goals was a clean-sheet scheduling system. Bob Crandall told my boss that there no way it could be done for even three aircraft - so this is what I built.
By expanding our knowledge of SQL facilities, we can let all the boring work be handled via SQL rather than a lot of middle-tier code, and we can get performance benefits as an added bonus. Here are some SQL techniques to solve problems that would otherwise require a lot of complex coding, freeing up your time to focus on the delivery of great applications.
Most important "trick" of performance instrumentationCary Millsap
This is the material from my 10-minute TED-style talk 2014-09-29 at OakTable World held in conjunction with Oracle OpenWorld 2014 in San Francisco. It explains the importance of assigning a unique id to the Oracle Database code path associated with each performance experience that users can have with your system
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
More Related Content
Similar to Performance e Produtividade: 2 Habilidades para Transformar seu Relacionamento com Banco de Dados
Slides from OOW13
Its the age old problem. The SQL statement that needs to run in 5 seconds - unfortunately runs in 10 seconds, or 10 minutes, or 10 hours. A SQL statement gets emailed to you with the simple subject title: "Make it faster". We'll start from this point in the process, and look at what you can do to tackle this common issue.
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxgilpinleeanna
MSCD650 Final Exam feedback Form
MSCD650 Final Exam Grading Form
(Instructions follow the form)
Coding
55 Percent
Points Earned
Comments:
Trigger Code:
· Code meets requirements
· Code compiles cleanly
/15
Pre-Calculation Procedure Code
· Code meets requirements
· Code compiles cleanly
/15
PL/SQL Block Code
· Code meets requirements
· Code compiles cleanly
/15
Function Code
· Code meets requirements
· Code compiles cleanly
/10
/55
Unit Testing
35 Percent
Points Earned
Comments:
Unit Test for Trigger Code:
· All conditions are thoroughly tested
· The code runs successfully
· All data to prove test worked is displayed
/10
Unit Test for Procedure Code:
· All conditions are thoroughly tested
· The code runs successfully
· All data to prove test worked is displayed
· The tester can easily follow the path of the execution.
/10
.
Unit Test for PL/SQL Block Code:
· All conditions are thoroughly tested
· The code runs successfully
· All data to prove test worked is displayed
· The tester can easily follow the path of the execution.
/10
Unit Test for View/Function Code:
· All conditions are thoroughly tested
· The code runs successfully
· All data to prove test worked is displayed
· The tester can easily follow the path of the execution.
/5
/35
Documentation
10 Percent
Points Earned
Comments:
Presentation:
· The document is easy to read.
· The document is Professional in appearance
· It is easy for the reader to find what they are looking for.
/5
Documentation:
· Code is documented so that anyone who picks it up knows what it is doing.
/5
/10
Total 100
Percent
Points Earned
Comments:
Case Study
Overview of assignment
As a new ABC Consultant assigned to the XYZ Company, you have been asked to enhance the current system to include payroll processing. Although the current employee table has monthly salary and commission columns, it does not provide any means for storing employee deductions. You will add the tables necessary to store employee deductions. Next you will create a payroll pre-calculation program that will calculate the net pay for all the employees via a batch process (a stored procedure in a package, which will call other stored procedures within the package). Although this is not a complete payroll system, the unit test results must be accurate.
Next you will create two PL/SQL blocks for inserting and deleting rows from the employee deduction table. These PL/SQL blocks will be passed information from host or bind variables and a third PL/SQL block which will assign the variables defined in SQL*Plus (e.g. employee number, dollar amount and deduction name). Since the XYZ Company wants to track changes to the employee and employee deduction tables, you will create two database triggers that will update audit tables when rows are changed or deleted.
The XYZ Company also requires a view that will display specific employee information, plus the number of deductions for an employe ...
Airline scheduling and pricing using a genetic algorithmAlan Walker
Some of my earlier research work on "clean sheet" scheduling for airlines. AIrline timetables are generally created by hand, and then mathematical models are used to optimize and tweak them. This was the first published work in the industry for diong the whole process in one system. Combines a number of different airline operations research models into a single framework.
When the AA / Sabre Research Group was created, one of the goals was a clean-sheet scheduling system. Bob Crandall told my boss that there no way it could be done for even three aircraft - so this is what I built.
By expanding our knowledge of SQL facilities, we can let all the boring work be handled via SQL rather than a lot of middle-tier code, and we can get performance benefits as an added bonus. Here are some SQL techniques to solve problems that would otherwise require a lot of complex coding, freeing up your time to focus on the delivery of great applications.
Most important "trick" of performance instrumentationCary Millsap
This is the material from my 10-minute TED-style talk 2014-09-29 at OakTable World held in conjunction with Oracle OpenWorld 2014 in San Francisco. It explains the importance of assigning a unique id to the Oracle Database code path associated with each performance experience that users can have with your system
Similar to Performance e Produtividade: 2 Habilidades para Transformar seu Relacionamento com Banco de Dados (20)
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofsAlex Pruden
This paper presents Reef, a system for generating publicly verifiable succinct non-interactive zero-knowledge proofs that a committed document matches or does not match a regular expression. We describe applications such as proving the strength of passwords, the provenance of email despite redactions, the validity of oblivious DNS queries, and the existence of mutations in DNA. Reef supports the Perl Compatible Regular Expression syntax, including wildcards, alternation, ranges, capture groups, Kleene star, negations, and lookarounds. Reef introduces a new type of automata, Skipping Alternating Finite Automata (SAFA), that skips irrelevant parts of a document when producing proofs without undermining soundness, and instantiates SAFA with a lookup argument. Our experimental evaluation confirms that Reef can generate proofs for documents with 32M characters; the proofs are small and cheap to verify (under a second).
Paper: https://eprint.iacr.org/2023/1886
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Maruthi Prithivirajan, Head of ASEAN & IN Solution Architecture, Neo4j
Get an inside look at the latest Neo4j innovations that enable relationship-driven intelligence at scale. Learn more about the newest cloud integrations and product enhancements that make Neo4j an essential choice for developers building apps with interconnected data and generative AI.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Performance e Produtividade: 2 Habilidades para Transformar seu Relacionamento com Banco de Dados
1. 2 HABILIDADES PARA TRANSFORMAR SEU
RELACIONAMENTO COM BANCO DE DADOS
PERFORMANCE E
PRODUTIVIDADE
#TDCSP
Rodrigo Moutinho
@rcmoutinho
Dani Monteiro
@DaniMonteiroDBA
2. Agenda
● Hackeando sua consulta
● Conhecendo os recursos disponíveis
● Consultas avançadas?
● Automatizando seu ambiente
● DEMO!
● E o NoSQL?
● OUTRA DEMO!
3. Exemplo Real
● ERP TOTVS
● Fábrica de Camisa Esportiva
● O que tenho para liberar no meu estoque?
● Processo diário de mais de duas horas
(um clique)
4. SELECT
SC5.C5_NUM AS PED,
SC5.C5_VEND1 AS REPRES,
SA1.A1_NOME AS NOME,
(
SELECT sum ((C6_QTDVEN-C6_QTDENT))
FROM SC6010 C6, SC9010 C9
WHERE C6_NUM = SC5.C5_NUM
AND C6_NUM = C9_PEDIDO
AND C6.C6_PRODUTO = C9.C9_PRODUTO
AND C9.C9_NFISCAL = ''
AND C9.C9_XLIST = ''
AND C6.D_E_L_E_T_ = ''
AND C9.D_E_L_E_T_ = ''
AND C6_BLQ <> 'R'
AND C6_LOCAL = '05'
AND C9_LOCAL = '05'
) AS QTDFAL,
(
SELECT sum ((C6_QTDVEN-C6_QTDENT) * C6_PRCVEN)
FROM SC6010 C6, SC9010 C9
WHERE C6_NUM = SC5.C5_NUM
AND C6_NUM = C9_PEDIDO
AND C6.C6_PRODUTO = C9.C9_PRODUTO
AND C9.C9_NFISCAL = ''
AND C9.C9_XLIST = ''
AND C6.D_E_L_E_T_ = ''
AND C9.D_E_L_E_T_ = ''
AND C6_BLQ <> 'R'
AND C6_LOCAL = '05'
AND C9_LOCAL = '05'
) AS VALFAL,
(
SELECT sum (((C6_QTDVEN-C6_QTDENT) * C6_PRCVEN)-(C6_XQTD05*C6_PRCVEN))
FROM SC6010 C6, SC9010 C9
WHERE C6_NUM = SC5.C5_NUM
AND C6_NUM = C9_PEDIDO
AND C6.C6_PRODUTO = C9.C9_PRODUTO
AND C9.C9_NFISCAL = ''
AND C9.C9_XLIST = ''
AND C6.D_E_L_E_T_ = ''
AND C9.D_E_L_E_T_ = ''
AND C6_BLQ <> 'R'
AND C6_LOCAL = '05'
AND C9_LOCAL = '05'
) AS VALOR,
SE4.E4_COND AS COND,
SC5.C5_OBSPED AS OBS,
SC5.C5_PREVIST as PREV,
SC5.C5_XST05 AS ST,
SC5.C5_XFRET AS FRET,
(
SELECT SUM(C6_VALOR) FROM SC6010 C6, SC9010 C9
WHERE C6_NUM = SC5.C5_NUM
AND C6.C6_NUM = C9.C9_PEDIDO
AND C6.C6_PRODUTO = C9.C9_PRODUTO
AND C9.C9_NFISCAL = ''
AND C9.C9_XLIST = ''
AND C6.D_E_L_E_T_ = ''
AND C9.D_E_L_E_T_ = ''
AND C6.C6_LOCAL = '05'
AND C6.C6_BLQ <> 'R'
) AS TOT
FROM SC5010 SC5,SC6010 SC6, SC9010 SC9,SA1010 SA1,SF4010 SF4,SE4010 SE4
WHERE SA1.A1_FILIAL = ' '
AND SE4.E4_FILIAL = ' '
AND SC5.C5_FILIAL = SC6.C6_FILIAL
AND SF4.F4_FILIAL = ' '
AND (SC5.C5_XFLAG = 'PE' OR SC5.C5_XFLAG = 'PAR' OR SC5.C5_XFLAG = 'LIB')
AND (SC5.C5_XSEP ='' or SC5.C5_XSEP ='1')
AND (SC6.C6_XFLAG = 'PE' or SC6.C6_LOCAL = '05' )
AND SC5.C5_NOTA = ''
AND SC5.C5_NUM = SC6.C6_NUM
AND SC6.C6_NUM = SC9.C9_PEDIDO
AND SC5.C5_NUM = SC9.C9_PEDIDO
AND SC6.C6_PRODUTO = SC9.C9_PRODUTO
AND SC9.C9_XLIST = ''
AND SC9.C9_NFISCAL = ''
AND SC5.C5_CLIENT = SA1.A1_COD
AND SC6.C6_BLQ <> 'R'
AND SC5.C5_TIPO = 'N'
AND SC5.C5_CONDPAG = SE4.E4_CODIGO
AND SC6.C6_TES = SF4.F4_CODIGO
AND SF4.F4_ESTOQUE = 'S'
AND SC6.C6_LOCAL = '05'
AND (SC6.C6_QTDVEN-SC6.C6_QTDENT) > 0
AND SC9.D_E_L_E_T_ = ''
AND SC5.D_E_L_E_T_ = ''
AND SC6.D_E_L_E_T_ = ''
AND SF4.D_E_L_E_T_ = ''
AND SE4.D_E_L_E_T_ = ''
AND SA1.D_E_L_E_T_ = ''
AND NOT EXISTS (
SELECT 1
FROM SC9010
WHERE C9_FILIAL = ' '
AND C9_PEDIDO = SC5.C5_NUM
AND D_E_L_E_T_ = ''
AND C9_BLCRED <> ''
AND C9_NFISCAL = ''
AND C9_BLCRED <> '10'
)
GROUP BY
SC5.C5_NUM,
SC5.C5_VEND1,
SA1.A1_NOME,
SE4.E4_COND ,
SC5.C5_OBSPED,
SC5.C5_PREVIST,
SC5.C5_XST05,
SC5.C5_XFRET
ORDER BY SA1.A1_NOME;
O Problema…
10. Materialized Views
(PostgreSQL 9.3+)
CREATE MATERIALIZED VIEW sales_summary AS
SELECT
seller_no,
invoice_date,
sum(invoice_amt)::numeric(13,2) as sales_amt
FROM invoice
WHERE invoice_date < CURRENT_DATE
GROUP BY seller_no, invoice_date
ORDER BY seller_no, invoice_date;
PostgreSQL
Documentation
11. Materialized Views
(PostgreSQL 9.3+)
-- Índices
CREATE UNIQUE INDEX sales_summary_seller ON
sales_summary (seller_no, invoice_date);
-- Atualizar os dados
REFRESH MATERIALIZED VIEW sales_summary;
PostgreSQL
Documentation
12. Functions
(PostgreSQL 7.1+)
CREATE OR REPLACE FUNCTION increment(i integer)
RETURNS integer AS $$
BEGIN
RETURN i + 1;
END;
$$ LANGUAGE plpgsql;
PostgreSQL
Documentation
13. Common Table Expressions
(PostgreSQL 8.4+)
WITH regional_sales AS (
SELECT region, SUM(amount) AS total_sales
FROM orders
GROUP BY region
), top_regions AS (
SELECT region
FROM regional_sales
WHERE total_sales > (SELECT SUM(total_sales)/10 FROM regional_sales)
)
SELECT region, product, SUM(quantity) AS product_units, SUM(amount) AS product_sales
FROM orders
WHERE region IN (SELECT region FROM top_regions)
GROUP BY region, product;
PostgreSQL
Documentation
14. WITH regional_sales AS (
SELECT region, SUM(amount) AS total_sales
FROM orders
GROUP BY region
), top_regions AS (
SELECT region
FROM regional_sales
WHERE total_sales > (SELECT SUM(total_sales)/10 FROM regional_sales)
)
SELECT region, product, SUM(quantity) AS product_units, SUM(amount) AS product_sales
FROM orders
WHERE region IN (SELECT region FROM top_regions)
GROUP BY region, product;
PostgreSQL
Documentation
Common Table Expressions
(PostgreSQL 8.4+)
15. WITH RECURSIVE included_parts(sub_part, part, quantity) AS (
SELECT sub_part, part, quantity
FROM parts
WHERE part = 'our_product’
UNION ALL
SELECT p.sub_part, p.part, p.quantity
FROM included_parts pr, parts p
WHERE p.part = pr.sub_part
)
SELECT sub_part, SUM(quantity) as total_quantity
FROM included_parts
GROUP BY sub_part
PostgreSQL
Documentation
Common Table Expressions
(PostgreSQL 8.4+)
16. WITH RECURSIVE included_parts(sub_part, part, quantity) AS (
SELECT sub_part, part, quantity
FROM parts
WHERE part = 'our_product’
UNION ALL
SELECT p.sub_part, p.part, p.quantity
FROM included_parts pr, parts p
WHERE p.part = pr.sub_part
)
SELECT sub_part, SUM(quantity) as total_quantity
FROM included_parts
GROUP BY sub_part
PostgreSQL
Documentation
Common Table Expressions
(PostgreSQL 8.4+)
18. SELECT
SC5.C5_NUM AS PED,
SC5.C5_VEND1 AS REPRES,
SA1.A1_NOME AS NOME,
(SELECT SUM((C6_QTDVEN - C6_QTDENT))
FROM SC6010 C6, SC9010 C9 WHERE ... [10 condições] ) AS QTDFAL,
(SELECT SUM((C6_QTDVEN - C6_QTDENT) * C6_PRCVEN)
FROM SC6010 C6, SC9010 C9 WHERE ... [10 condições] ) AS VALFAL,
(SELECT SUM (((C6_QTDVEN - C6_QTDENT) * C6_PRCVEN) - (C6_XQTD05 * C6_PRCVEN))
FROM SC6010 C6, SC9010 C9 WHERE ... [10 condições] ) AS VALOR,
SE4.E4_COND AS COND,
SC5.C5_OBSPED AS OBS,
SC5.C5_PREVIST as PREV,
SC5.C5_XST05 AS ST,
SC5.C5_XFRET AS FRET,
(SELECT SUM(C6_VALOR)
FROM SC6010 C6, SC9010 C9 WHERE ... [9 condições] ) AS TOT
FROM SC5010 SC5, SC6010 SC6, SC9010 SC9, SA1010 SA1, SF4010 SF4, SE4010 SE4
WHERE ... [29 condições]
GROUP BY SC5.C5_NUM, SC5.C5_VEND1, SA1.A1_NOME, SE4.E4_COND,
SC5.C5_OBSPED, SC5.C5_PREVIST, SC5.C5_XST05, SC5.C5_XFRET
ORDER BY SA1.A1_NOME
Subqueries
20. WITH TABLE_PEDIDO AS (
SELECT ...
), TABLE_QUANTIDADE AS (
SELECT ...
), TABLE_ITENS_C6 AS (
SELECT ... FROM TABLE_QUANTIDADE ...
)
SELECT ...
FROM
TABLE_PEDIDO AS T_PEDIDO,
TABLE_ITENS_C6 AS T_ITENS_C6, ...
WHERE ...
ORDER BY ...
Common Table Expressions
Reutilizar consultas de forma temporária
21. ), TABLE_QUANTIDADE AS (
SELECT
C6_NUM AS C6NUM, C6_QTDVEN AS C6QTDVEN, C6_QTDENT AS C6QTDENT,
C6_PRCVEN AS C6PRCVEN, C6_XQTD05 AS C6XQTD05, C6_VALOR AS C6VALOR,
C6_XFLAG AS C6XFLAG, C6_LOCAL AS C6LOCAL, C6_TES AS C6TES
FROM SC6010 C6, SC9010 C9
WHERE ... [11 condições]
), TABLE_ITENS_C6 AS (
SELECT
C6NUM AS NUM,
C6TES AS C6TES,
SUM((C6QTDVEN-C6QTDENT)) AS QTDFAL,
SUM((C6QTDVEN-C6QTDENT) * C6PRCVEN) AS VALFAL,
SUM(((C6QTDVEN-C6QTDENT) * C6PRCVEN) - (C6XQTD05*C6PRCVEN)) AS VALOR,
SUM(C6VALOR) AS TOT
FROM TABLE_QUANTIDADE
GROUP BY C6NUM, C6TES
)
Melhor Performance
e Legibilidade
26. Falta de produtividade com...
● Tarefas diárias e repetitivas
● Baixo ou nenhum isolamento entre cenários
● Praticamente impossível lidar com várias versões
de software ao mesmo tempo
36. Não fuja da modelagem!
● Análise seu cenário
● Conheça os padrões
● Sem schema <> bagunça generalizada
● Data types errados afetam o desempenho!
● Quais as operações principais?
○ Leituras ou escrita?
40. Novidades da versão 4.2
● MongoDB Atlas Full-Text Search
● Wildcard indexes
● On-Demand Materialized Views
● Operadores novos do Aggregation Framework
● Velocidade na sincronização da replicação