SlideShare a Scribd company logo
1 of 7
Netezza – Query runtime using 
plans 
Rashmi Malik
Query run time 
• The first place where we look for a query’s run time is the value provided in Netezza’s history view 
“$v_hist_queries”. 
• The view “$v_hist_queries” calculates run time for a query as: 
“end time – submit time” found in query level history tables. 
• Though, that is the actual time that the user waited for the results, it does not necessarily reflect 
the actual execution time of the query. For starters, it is calculated using “submit time”, and not 
something like “start time”. 
• There is a bit of work that goes on after the query is submitted, and before it actually starts. 
• Netezza reports some of this “work” in the view $v_hist_queries’ columns such as “queue time”, 
“GRA time”, “Prep time”. 
• So can we then assume that the actual runtime is: runtime – (queue time + GRA time + Prep time)? 
Well, for most of the audience, this is more or less a fair value of the actual runtime. However, if 
one was to calculate the runtime at a deeper level, using plans, then it starts to get more 
complicated, and we’ll see that some values are missing from Netezza’s history tables.
Going one level deeper from query to plans 
• Netezza calculates the values in the view $v_hist_queries using the numbers in 
query and plan history tables. 
• A query can have multiple plans associated with it. Though, it will only have 
one plan file. 
• Each plan corresponds to either a “meta data” query fired depending upon the 
client issuing the query, or to the actual query fired by the user. 
• Most of the stages in a plan’s (main or other) lifecycle are captured/recorded 
in Netezza history tables using timestamp values, as follows: 
– Submit time – The time the plan was submitted. 
– Queue time – The time the plan went in Queue state. 
– Prep time – The time the plan went in Prep state. 
– GRA time – The time the plan requested for resource allocation. 
– Start time – The time the plan began execution. 
– End time – The time the plan finished execution. 
• However, some time intervals are not captured in history tables…
Time gaps - query and plan history 
• There are a few stages, where time is spent but not captured during 
execution of query/plans. These are: 
– The time between query submit time and the first plan’s submit time. 
– The time between a plan’s end time and the next plan’s submit time. 
Let’s call this “pre-submit” time for the next plan. 
– The time between the last plan’s end time, and query’s end time. 
• This is explained in the next diagram…
Query and Plan history – times captured 
QUERY_PROLOG QUERY_EPILOG 
query 
submittime 
Plan 
submittime 
Plan 
queuetime 
Plan 
preptime 
Plan 
gratime 
Plan 
starttime 
Plan 
submittime 
Plan 
queuetime 
Plan 
preptime 
Plan 
gratime 
Plan 
starttime 
… 
… 
… 
Plan 
endtime 
Plan 
endtime 
query 
endtime 
PLAN_PROLOG PLAN_EPILOG 
… 
… 
… 
Unaccounted time gap 
time gap – either side can be 
greater. 
“Pre-submit” time, either side can be greater
So how do we arrive at runtime? 
• When we add up all the available and elusive/missing time intervals at plan 
level, and roll it up for a query, it matches the “runtime” reported in 
$v_hist_queries. i.e. 
query end time – query submit time 
= 
query submit time to first plan submit time gap 
+ Σ (all plan times reported in history tables + time gap between this plan’s end time 
and next plan’s submit time) over all plans for a query 
+ last plan end time to query end time gap 
• Adding this up is important to ensure when we fetch time from plan files, we 
are not missing out any prospective “run time”. 
• Though, it is open to interpretation/definition, one of the run time calculation 
can be: sum of all plan files’ runtime + the time it takes from the last plan to 
end till query end. This is shown in the next diagram.
As calculated in 
$v_hist_queries 
Queue time in 
$v_hist_queries 
QUERY_PROLOG QUERY_EPILOG 
query 
submittime 
Set-up time Queue time Prep time GRA time Run time* 
Plan 
submittime 
Plan 
queuetime 
Plan 
preptime 
Plan 
gratime 
Plan 
starttime 
Plan 
submittime 
Plan 
queuetime 
Plan 
preptime 
Plan 
gratime 
Plan 
starttime 
… 
… 
… 
Plan 
endtime 
Plan 
endtime 
query 
endtime 
PLAN_PROLOG PLAN_EPILOG 
… 
… 
… 
Unaccounted time gap 
time gap – either side can 
be greater. 
“Pre-submit” time, can be negative or positive 
Suggested 
definition

More Related Content

What's hot

Continuously Updating Query Results over Real-Time Linked Data
Continuously Updating Query Results over Real-Time Linked DataContinuously Updating Query Results over Real-Time Linked Data
Continuously Updating Query Results over Real-Time Linked DataRuben Taelman
 
Flink Forward Berlin 2017: Fabian Hueske - Using Stream and Batch Processing ...
Flink Forward Berlin 2017: Fabian Hueske - Using Stream and Batch Processing ...Flink Forward Berlin 2017: Fabian Hueske - Using Stream and Batch Processing ...
Flink Forward Berlin 2017: Fabian Hueske - Using Stream and Batch Processing ...Flink Forward
 
Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apac...
Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apac...Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apac...
Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apac...Ververica
 
Flink Forward Berlin 2017: Kostas Kloudas - Complex Event Processing with Fli...
Flink Forward Berlin 2017: Kostas Kloudas - Complex Event Processing with Fli...Flink Forward Berlin 2017: Kostas Kloudas - Complex Event Processing with Fli...
Flink Forward Berlin 2017: Kostas Kloudas - Complex Event Processing with Fli...Flink Forward
 
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...Flink Forward
 
Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...
Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...
Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...Flink Forward
 
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy FarkasVirtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy FarkasFlink Forward
 
Continuous Self-Updating Query Results over Dynamic Linked Data
Continuous Self-Updating Query Results over Dynamic Linked DataContinuous Self-Updating Query Results over Dynamic Linked Data
Continuous Self-Updating Query Results over Dynamic Linked DataRuben Taelman
 
Data Stream Analytics - Why they are important
Data Stream Analytics - Why they are importantData Stream Analytics - Why they are important
Data Stream Analytics - Why they are importantParis Carbone
 
Flink Forward Berlin 2017: Patrick Gunia - Migration of a realtime stats prod...
Flink Forward Berlin 2017: Patrick Gunia - Migration of a realtime stats prod...Flink Forward Berlin 2017: Patrick Gunia - Migration of a realtime stats prod...
Flink Forward Berlin 2017: Patrick Gunia - Migration of a realtime stats prod...Flink Forward
 
Debunking Common Myths in Stream Processing
Debunking Common Myths in Stream ProcessingDebunking Common Myths in Stream Processing
Debunking Common Myths in Stream ProcessingKostas Tzoumas
 
I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...
I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...
I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...Jonas Traub
 
Project management Pert & cpm
Project management Pert & cpm Project management Pert & cpm
Project management Pert & cpm RandhirKumar172
 
Fabian Hueske - Stream Analytics with SQL on Apache Flink
Fabian Hueske - Stream Analytics with SQL on Apache FlinkFabian Hueske - Stream Analytics with SQL on Apache Flink
Fabian Hueske - Stream Analytics with SQL on Apache FlinkVerverica
 
Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck - Pravega: Storage Rei...
Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck -  Pravega: Storage Rei...Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck -  Pravega: Storage Rei...
Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck - Pravega: Storage Rei...Flink Forward
 

What's hot (20)

Network scheduling
Network scheduling Network scheduling
Network scheduling
 
Continuously Updating Query Results over Real-Time Linked Data
Continuously Updating Query Results over Real-Time Linked DataContinuously Updating Query Results over Real-Time Linked Data
Continuously Updating Query Results over Real-Time Linked Data
 
Flink Forward Berlin 2017: Fabian Hueske - Using Stream and Batch Processing ...
Flink Forward Berlin 2017: Fabian Hueske - Using Stream and Batch Processing ...Flink Forward Berlin 2017: Fabian Hueske - Using Stream and Batch Processing ...
Flink Forward Berlin 2017: Fabian Hueske - Using Stream and Batch Processing ...
 
Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apac...
Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apac...Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apac...
Keynote: Stephan Ewen - Stream Processing as a Foundational Paradigm and Apac...
 
Flink Forward Berlin 2017: Kostas Kloudas - Complex Event Processing with Fli...
Flink Forward Berlin 2017: Kostas Kloudas - Complex Event Processing with Fli...Flink Forward Berlin 2017: Kostas Kloudas - Complex Event Processing with Fli...
Flink Forward Berlin 2017: Kostas Kloudas - Complex Event Processing with Fli...
 
S pert cpm
S pert cpmS pert cpm
S pert cpm
 
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
Flink Forward Berlin 2017: Francesco Versaci - Integrating Flink and Kafka in...
 
Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...
Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...
Flink Forward Berlin 2018: Shriya Arora - "Taming large-state to join dataset...
 
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy FarkasVirtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
 
Continuous Self-Updating Query Results over Dynamic Linked Data
Continuous Self-Updating Query Results over Dynamic Linked DataContinuous Self-Updating Query Results over Dynamic Linked Data
Continuous Self-Updating Query Results over Dynamic Linked Data
 
Data Stream Analytics - Why they are important
Data Stream Analytics - Why they are importantData Stream Analytics - Why they are important
Data Stream Analytics - Why they are important
 
06 pert cpm (1)
06 pert cpm (1)06 pert cpm (1)
06 pert cpm (1)
 
Pert cpm-22-3-21
Pert cpm-22-3-21Pert cpm-22-3-21
Pert cpm-22-3-21
 
Flink Forward Berlin 2017: Patrick Gunia - Migration of a realtime stats prod...
Flink Forward Berlin 2017: Patrick Gunia - Migration of a realtime stats prod...Flink Forward Berlin 2017: Patrick Gunia - Migration of a realtime stats prod...
Flink Forward Berlin 2017: Patrick Gunia - Migration of a realtime stats prod...
 
Debunking Common Myths in Stream Processing
Debunking Common Myths in Stream ProcessingDebunking Common Myths in Stream Processing
Debunking Common Myths in Stream Processing
 
I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...
I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...
I²: Interactive Real-Time Visualization for Streaming Data with Apache Flink ...
 
Project management Pert & cpm
Project management Pert & cpm Project management Pert & cpm
Project management Pert & cpm
 
Network Anaysis_ critical path methods
Network Anaysis_ critical path methodsNetwork Anaysis_ critical path methods
Network Anaysis_ critical path methods
 
Fabian Hueske - Stream Analytics with SQL on Apache Flink
Fabian Hueske - Stream Analytics with SQL on Apache FlinkFabian Hueske - Stream Analytics with SQL on Apache Flink
Fabian Hueske - Stream Analytics with SQL on Apache Flink
 
Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck - Pravega: Storage Rei...
Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck -  Pravega: Storage Rei...Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck -  Pravega: Storage Rei...
Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck - Pravega: Storage Rei...
 

Similar to Netezza Query Runtime Calculation Using Plans

L6.2 planing&scheduling
L6.2 planing&schedulingL6.2 planing&scheduling
L6.2 planing&schedulingmanusug
 
Project management
Project managementProject management
Project managementervinod
 
MS Project Management (Overviews) | Software Mange Tool | Software Project Ma...
MS Project Management (Overviews) | Software Mange Tool | Software Project Ma...MS Project Management (Overviews) | Software Mange Tool | Software Project Ma...
MS Project Management (Overviews) | Software Mange Tool | Software Project Ma...Kuldeep Kumar
 
3 pm3 t_2%20-%20activity%20duration%20estimating
3 pm3 t_2%20-%20activity%20duration%20estimating3 pm3 t_2%20-%20activity%20duration%20estimating
3 pm3 t_2%20-%20activity%20duration%20estimatingharwoodr
 
#NoEstimates project planning using Monte Carlo simulation
#NoEstimates project planning using Monte Carlo simulation#NoEstimates project planning using Monte Carlo simulation
#NoEstimates project planning using Monte Carlo simulationDimitar Bakardzhiev
 
Software Project Scheduling Diagrams
Software Project Scheduling DiagramsSoftware Project Scheduling Diagrams
Software Project Scheduling DiagramsSaqib Raza
 
12 lecture project scheduling 4
12 lecture project scheduling 412 lecture project scheduling 4
12 lecture project scheduling 4Ahmad Basim Hamza
 
project management -04.ppt
project management -04.pptproject management -04.ppt
project management -04.pptMdHelalHossain6
 
Pert,cpm, resource allocation and gert
Pert,cpm, resource allocation and gertPert,cpm, resource allocation and gert
Pert,cpm, resource allocation and gertRaj J Das
 
dokumen.tips_ms-project-presentation.pptx
dokumen.tips_ms-project-presentation.pptxdokumen.tips_ms-project-presentation.pptx
dokumen.tips_ms-project-presentation.pptxSunilHotkar2
 
ms-project-presentation.pptx
ms-project-presentation.pptxms-project-presentation.pptx
ms-project-presentation.pptxSunilHotkar2
 
PERT (Program evaluation review technique)
PERT (Program evaluation review technique) PERT (Program evaluation review technique)
PERT (Program evaluation review technique) Tanoj Patidar
 
MS Project Presentation
MS Project PresentationMS Project Presentation
MS Project PresentationKhem Singh
 

Similar to Netezza Query Runtime Calculation Using Plans (20)

L6.2 planing&scheduling
L6.2 planing&schedulingL6.2 planing&scheduling
L6.2 planing&scheduling
 
Project management
Project managementProject management
Project management
 
Project management techniques
Project management techniquesProject management techniques
Project management techniques
 
Allocating resources
Allocating resourcesAllocating resources
Allocating resources
 
MS Project Management (Overviews) | Software Mange Tool | Software Project Ma...
MS Project Management (Overviews) | Software Mange Tool | Software Project Ma...MS Project Management (Overviews) | Software Mange Tool | Software Project Ma...
MS Project Management (Overviews) | Software Mange Tool | Software Project Ma...
 
Unit IV-Project Management
Unit IV-Project ManagementUnit IV-Project Management
Unit IV-Project Management
 
3 pm3 t_2%20-%20activity%20duration%20estimating
3 pm3 t_2%20-%20activity%20duration%20estimating3 pm3 t_2%20-%20activity%20duration%20estimating
3 pm3 t_2%20-%20activity%20duration%20estimating
 
PM-Problems.pptx
PM-Problems.pptxPM-Problems.pptx
PM-Problems.pptx
 
Ch09 (1).pptx
Ch09 (1).pptxCh09 (1).pptx
Ch09 (1).pptx
 
#NoEstimates project planning using Monte Carlo simulation
#NoEstimates project planning using Monte Carlo simulation#NoEstimates project planning using Monte Carlo simulation
#NoEstimates project planning using Monte Carlo simulation
 
Software Project Scheduling Diagrams
Software Project Scheduling DiagramsSoftware Project Scheduling Diagrams
Software Project Scheduling Diagrams
 
12 lecture project scheduling 4
12 lecture project scheduling 412 lecture project scheduling 4
12 lecture project scheduling 4
 
project management -04.ppt
project management -04.pptproject management -04.ppt
project management -04.ppt
 
Project Management
Project ManagementProject Management
Project Management
 
PERT.pptx
PERT.pptxPERT.pptx
PERT.pptx
 
Pert,cpm, resource allocation and gert
Pert,cpm, resource allocation and gertPert,cpm, resource allocation and gert
Pert,cpm, resource allocation and gert
 
dokumen.tips_ms-project-presentation.pptx
dokumen.tips_ms-project-presentation.pptxdokumen.tips_ms-project-presentation.pptx
dokumen.tips_ms-project-presentation.pptx
 
ms-project-presentation.pptx
ms-project-presentation.pptxms-project-presentation.pptx
ms-project-presentation.pptx
 
PERT (Program evaluation review technique)
PERT (Program evaluation review technique) PERT (Program evaluation review technique)
PERT (Program evaluation review technique)
 
MS Project Presentation
MS Project PresentationMS Project Presentation
MS Project Presentation
 

Recently uploaded

CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Recently uploaded (20)

CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

Netezza Query Runtime Calculation Using Plans

  • 1. Netezza – Query runtime using plans Rashmi Malik
  • 2. Query run time • The first place where we look for a query’s run time is the value provided in Netezza’s history view “$v_hist_queries”. • The view “$v_hist_queries” calculates run time for a query as: “end time – submit time” found in query level history tables. • Though, that is the actual time that the user waited for the results, it does not necessarily reflect the actual execution time of the query. For starters, it is calculated using “submit time”, and not something like “start time”. • There is a bit of work that goes on after the query is submitted, and before it actually starts. • Netezza reports some of this “work” in the view $v_hist_queries’ columns such as “queue time”, “GRA time”, “Prep time”. • So can we then assume that the actual runtime is: runtime – (queue time + GRA time + Prep time)? Well, for most of the audience, this is more or less a fair value of the actual runtime. However, if one was to calculate the runtime at a deeper level, using plans, then it starts to get more complicated, and we’ll see that some values are missing from Netezza’s history tables.
  • 3. Going one level deeper from query to plans • Netezza calculates the values in the view $v_hist_queries using the numbers in query and plan history tables. • A query can have multiple plans associated with it. Though, it will only have one plan file. • Each plan corresponds to either a “meta data” query fired depending upon the client issuing the query, or to the actual query fired by the user. • Most of the stages in a plan’s (main or other) lifecycle are captured/recorded in Netezza history tables using timestamp values, as follows: – Submit time – The time the plan was submitted. – Queue time – The time the plan went in Queue state. – Prep time – The time the plan went in Prep state. – GRA time – The time the plan requested for resource allocation. – Start time – The time the plan began execution. – End time – The time the plan finished execution. • However, some time intervals are not captured in history tables…
  • 4. Time gaps - query and plan history • There are a few stages, where time is spent but not captured during execution of query/plans. These are: – The time between query submit time and the first plan’s submit time. – The time between a plan’s end time and the next plan’s submit time. Let’s call this “pre-submit” time for the next plan. – The time between the last plan’s end time, and query’s end time. • This is explained in the next diagram…
  • 5. Query and Plan history – times captured QUERY_PROLOG QUERY_EPILOG query submittime Plan submittime Plan queuetime Plan preptime Plan gratime Plan starttime Plan submittime Plan queuetime Plan preptime Plan gratime Plan starttime … … … Plan endtime Plan endtime query endtime PLAN_PROLOG PLAN_EPILOG … … … Unaccounted time gap time gap – either side can be greater. “Pre-submit” time, either side can be greater
  • 6. So how do we arrive at runtime? • When we add up all the available and elusive/missing time intervals at plan level, and roll it up for a query, it matches the “runtime” reported in $v_hist_queries. i.e. query end time – query submit time = query submit time to first plan submit time gap + Σ (all plan times reported in history tables + time gap between this plan’s end time and next plan’s submit time) over all plans for a query + last plan end time to query end time gap • Adding this up is important to ensure when we fetch time from plan files, we are not missing out any prospective “run time”. • Though, it is open to interpretation/definition, one of the run time calculation can be: sum of all plan files’ runtime + the time it takes from the last plan to end till query end. This is shown in the next diagram.
  • 7. As calculated in $v_hist_queries Queue time in $v_hist_queries QUERY_PROLOG QUERY_EPILOG query submittime Set-up time Queue time Prep time GRA time Run time* Plan submittime Plan queuetime Plan preptime Plan gratime Plan starttime Plan submittime Plan queuetime Plan preptime Plan gratime Plan starttime … … … Plan endtime Plan endtime query endtime PLAN_PROLOG PLAN_EPILOG … … … Unaccounted time gap time gap – either side can be greater. “Pre-submit” time, can be negative or positive Suggested definition