Oracle SQL Tuning 101 provides an overview of SQL tuning concepts and tools in Oracle Database. It discusses database tuning versus SQL tuning, proactive versus reactive tuning approaches, tools for SQL tracing and monitoring like SQL Trace, ASH, Autotrace, and SQL Monitor. The document also covers topics like full table scans, adaptive optimization features, pending statistics, and restoring or exporting statistics.
Design and develop with performance in mind
Establish a tuning environment
Index wisely
Reduce parsing
Take advantage of Cost Based Optimizer
Avoid accidental table scans
Optimize necessary table scans
Optimize joins
Use array processing
Consider PL/SQL for “tricky” SQL
This presentation explains all of the new features that are relevant for developers in Oracle 12c. It's been out for a couple of years, but many companies haven't updated to 12c. So, if you're looking to update soon, or are just interested in what the new features are, look at this presentation.
The full post is available at http://www.completeitprofessional.com/oracle-12c-new-features-for-developers
Design and develop with performance in mind
Establish a tuning environment
Index wisely
Reduce parsing
Take advantage of Cost Based Optimizer
Avoid accidental table scans
Optimize necessary table scans
Optimize joins
Use array processing
Consider PL/SQL for “tricky” SQL
This presentation explains all of the new features that are relevant for developers in Oracle 12c. It's been out for a couple of years, but many companies haven't updated to 12c. So, if you're looking to update soon, or are just interested in what the new features are, look at this presentation.
The full post is available at http://www.completeitprofessional.com/oracle-12c-new-features-for-developers
On version 12c Oracle introduced new features to allow Adaptive optimizations: Adaptive Plans and Adaptive Statistics. After a quick presentation of concepts, this session will explore the interaction of these features with other performance management techniques using examples, like SPM and SQL profiles. Attendees will get an updated picture of tools available to troubleshoot performance issues, and how to get the most of these new features.
In this first of a series of presentations, we'll overview the differences between SQL and PL/SQL, and the first steps in optimization, as understanding RULE vs. COST, and how to slash 90% response time in data extractions running in SQL*Plus.
Antes de migrar de 10g a 11g o 12c, tome en cuenta las siguientes consideraciones. No es tan sencillo como simplemente cambiar de motor de base de datos, se necesita hacer consideraciones a nivel del aplicativo.
This is one of the 15 minute "TED" style talk presented as part of the Database Symposium at the ODTUG Kscope18 conference. In this presentation @SQLMaria shares details on 4 useful supplied PL/SQL package with the Oracle Database
Advanced tips for making Oracle databases fasterSolarWinds
If you struggle with performance issues in your Oracle database instance and can't easily pinpoint the cause, you may be missing crucial performance information.
Learn how to determine the best approach for tuning SQL statements and other issues by identifying the specific causes of slow performance.
Os melhores recursos novos do Oracle Database 12c para desenvolvedores e DBAs...Alex Zaballa
Esta sessão irá analisar quais dos novos recursos do Oracle Database 12c são os mais interessantes para DBAs e desenvolvedores e dará exemplos de como utilizá-los.
#oowbr
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
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.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...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.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
13. Mudanças que podem trazer
problemas
• Database upgraded
• Statistics gathered
• Schema changed
• Database parameter changed
• Application changed
• Operating system (OS) and hardware changed
• Data volume changed by more active users
14. Ferramentas para SQL Tuning -
Oracle
• SQL Trace (and TKPROF)
• Active Session History (ASH)
• EXPLAIN PLAN FOR
• AUTOTRACE
• SQL Developer
• DBMS_XPLAN
• SQL Monitor
15. ASH e AWR
• 1 sec snapshots of V$SESSION into ASH
• Every 10 ASH samples into AWR
**Requires Oracle Diagnostics Pack
*
23. AWR
• SQL ordered by Elapsed Time
• SQL ordered by CPU Time
• SQL ordered by User I/O Wait Time
• SQL ordered by Gets
• SQL ordered by Reads
• SQL ordered by Physical Reads (UnOptimized)
• SQL ordered by Executions
• SQL ordered by Parse Calls
• SQL ordered by Sharable Memory
• SQL ordered by Version Count
• SQL ordered by Cluster Wait Time*
28. Reativo - SQLT Diagnostic Tool
(Doc ID 215187.1)
• Prós: Suportada e atualizada pela Oracle
• Contras: Necessário instalação
Criada pelo Carlos Sierra
*
41. SQL MONITOR
• Real-time SQL monitoring foi introduzido no
Oracle Database 11g.
• Parallel queries, DML e DDL são
automaticamente monitorados.
• SQLs que consumem 5 segundos ou mais
segundos de CPU ou I/O em uma única
execução
• Hint /*+ MONITOR */
42. SQL MONITOR
• Oracle Enterprise Manager
• EM Database Express (12c)
• SQL Developer
• Linha de Comando
**Part of the Oracle Tuning Pack
46. Evento 10053
Mais conhecido como ”Wolfganging”
” Wolfgang Breitling was the first guy to really
analyze the content of these 10053 trace files
and publish his findings.”
Wolfgang wrote a paper called “A Look
Under the Hood of CBO.”
47. Evento 10053
ALTER SESSION SET EVENTS '10053 trace name
context forever, level 1';
SELECT * FROM EMP WHERE ENAME = 'SCOTT';
ALTER SESSION SET EVENTS '10053 trace name
context off';
48. Evento 10053
Level 1 or Level 2?
•1. Parameters used by the optimizer (level 1 only)
•2. Index statistics (level 1 only)
•3. Column statistics
•4. Single Access Paths
•5. Join Costs
•6. Table Joins Considered
•7. Join Methods Considered (NL/MS/HA)
49. Evento 10053
For another session:
SYS.DBMS_SYSTEM.SET_EV (SID,SERIAL ,10053,1)
Disable:
SYS.DBMS_SYSTEM.SET_EV (SID,SERIAL ,10053,0)
50. Evento 10053
11G R1 – SQL Inside PL/SQL
ALTER SESSION SET EVENTS
'trace[rdbms.SQL_Optimizer.*][sql:my_sql_id]';
ALTER SESSION SET EVENTS
'trace[rdbms.SQL_Optimizer.*] off';
53. Evento 10053
ALTER SESSION SET EVENTS '10053 trace name
context forever, level 1';
SELECT * FROM tb_pai p
WHERE EXISTS (SELECT 1 FROM tb_filho f
WHERE f.id_pai=p.id);
ALTER SESSION SET EVENTS '10053 trace name
context off';
70. OR Expansion
Query Original:
SELECT * FROM emp
WHERE job = 'CLERK' OR deptno = 10;
Query Transformada:
SELECT * FROM emp
WHERE job = 'CLERK’
UNION ALL
SELECT * FROM emp
WHERE deptno = 10 AND job <> 'CLERK';
71. Subquery Unnesting
Query Original:
SELECT * FROM accounts
WHERE custno IN
(SELECT custno FROM customers);
Query Transformada:
SELECT accounts.*
FROM accounts, customers
WHERE accounts.custno = customers.custno;
72. View Merging
Query Original:
CREATE VIEW emp_10 AS
SELECT empno, ename, job, sal, comm, deptno
FROM emp
WHERE deptno = 10;
SELECT empno FROM emp_10
WHERE empno > 7800;
Query transformada:
SELECT empno
FROM emp
WHERE deptno = 10 AND empno > 7800;
73. Predicate Pushing
Query Original:
CREATE VIEW two_emp_tables AS
SELECT empno, ename, job, sal, comm, deptno
FROM emp1
UNION
SELECT empno, ename, job, sal, comm, deptno
FROM emp2;
SELECT ename FROM two_emp_tables
WHERE deptno = 20;
74. Predicate Pushing
Query Transformada:
SELECT ename
FROM ( SELECT empno, ename, job,sal, comm, deptno
FROM emp1 WHERE deptno = 20
UNION
SELECT empno, ename, job,sal, comm, deptno
FROM emp2 WHERE deptno = 20 );
75. Transitivity
Query Original:
SELECT *
FROM emp, dept
WHERE emp.deptno = 20
AND emp.deptno = dept.deptno;
Query Transformada:
SELECT *
FROM emp, dept
WHERE emp.deptno = 20
AND emp.deptno = dept.deptno
AND dept.deptno = 20;
80. Full Table Scan
• Clustering Factor --> How well ordered the rows in
the table are in relation to the index.
• Selectivity of the query
• Number of table blocks
• Effective multiblock read count
• Relative cost of single vs. multiblock I/Os
• Parallelism
• Etc
84. Adaptive Features
Oracle Database 12.2 introduces the new
split-up adaptive parameters:
•OPTIMIZER_ADAPTIVE_PLANS
•OPTIMITER_ADAPTIVE_STATISTICS.
85. Adaptive Features
• On Oracle Database 12.1this can be
achieved by installing two patches.
86. Adaptive Features
The patch for bug# 22652097 introduces the two parameters
OPTIMIZER_ADAPTIVE_PLANS and
OPTIMIZER_ADAPTIVE_STATISTICS, and in addition removes
the parameter OPTIMIZER_ADAPTIVE_FEATURES.
The patch for bug# 21171382 disables the automatic creation
of extended statistics unless the optimizer preference
AUTO_STATS_EXTENSIONS is set to ON.
89. Hints
• Use para fornecer dados ao otimizador
que as estatísticas falharam em informar;
• Use com precaução;
• Use como último recurso.
90. SQL Tuning on EXADATA
• Tempo da query na M7: 180 minutos
• Tempo após clone - P8+Storage ?
• Tempo após ajuste da query: 29 horas
• Tempos após ajuste no M7: 17 minutos
97. Restore Statistics from History
Check the retention:
select
DBMS_STATS.GET_STATS_HISTORY_RETENTI
ON from dual;
Default is 31 days.
98. Restore Statistics from History
Statistics available for the table:
SELECT OWNER,
TABLE_NAME,
STATS_UPDATE_TIME
FROM dba_tab_stats_history
WHERE table_name='MY_TABLE';
99. Restore Statistics from History
Begin
dbms_stats.restore_table_stats(
'SCOTT',
'EMP',
‘08-NOV-16 11.38.05.015640 AM +08:00’);
End;
100. Export and Import schema
statistics
begin
dbms_stats.CREATE_STAT_TABLE( ownname=>user
, stattab=>'MY_STATS_TABLE'
);
end;
begin
dbms_stats.export_schema_stats( ownname=>user
, stattab=>'MY_STATS_TABLE'
, statid=>'CURRENT_STATS'
);
End;
101. Export and Import schema
statistics
EXPDP / IMPDP
begin
dbms_stats.import_schema_stats( ownname=>user
, stattab=>'MY_STATS_TABLE'
, statid=>'CURRENT_STATS'
);
End;
104. Invisible Indexes
• CREATE INDEX index_name ON
table_name(column_name) INVISIBLE;
• ALTER INDEX index_name INVISIBLE;
• ALTER INDEX index_name VISIBLE;
109. SQL trace, 10046, trcsess and
tkprof
ALTER SESSION SET sql_trace=TRUE;
ALTER SESSION SET sql_trace=FALSE;
EXEC DBMS_SESSION.set_sql_trace(sql_trace => TRUE);
EXEC DBMS_SESSION.set_sql_trace(sql_trace => FALSE);
ALTER SESSION SET EVENTS '10046 trace name context forever, level 12';
ALTER SESSION SET EVENTS '10046 trace name context off';
EXEC DBMS_SYSTEM.set_sql_trace_in_session(sid=>0000, serial#=>0000, sql_trace=>TRUE);
EXEC DBMS_SYSTEM.set_sql_trace_in_session(sid=>0000, serial#=>0000, sql_trace=>FALSE);
110. SQL trace, 10046, trcsess and
tkprof
CONN sys/password AS SYSDBA;
ORADEBUG SETMYPID;
ORADEBUG SETOSPID 0000;
ORADEBUG SETORAPID 000000;
ORADEBUG EVENT 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12;
ORADEBUG EVENT 10046 TRACE NAME CONTEXT OFF;
117. Evento 10046
ALTER SESSION SET EVENTS '10046 trace name
context forever, level 12';
SELECT * FROM tb_pai p
WHERE EXISTS (SELECT 1 FROM tb_filho f
WHERE f.id_pai=p.id);
ALTER SESSION SET EVENTS '10046 trace name
context off';