Class XPLAINSystemTableVisitor
java.lang.Object
org.apache.derby.impl.sql.execute.xplain.XPLAINSystemTableVisitor
- All Implemented Interfaces:
XPLAINVisitor
This is the Visitor, which explains the information and stores the statistics in
the system catalogs. It traverses the result set statistics tree and extracts the
information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Activation
private boolean
private DataDictionary
private LanguageConnectionContext
private boolean
private int
private List
<XPLAINResultSetDescriptor> private List
<XPLAINScanPropsDescriptor> private List
<XPLAINSortPropsDescriptor> private XPLAINStatementDescriptor
private XPLAINStatementTimingsDescriptor
private UUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
This method writes the created descriptor arrays to the cooresponding system catalogs.private void
This method writes only the stmt and its timing descriptor to the dataDictionaryprivate void
clean()
This method cleans up things after explanation.void
doXPLAIN
(RunTimeStatistics rss, Activation activation) the interface method, which gets called by the Top-ResultSet, which starts the tree traversal.private Connection
Open a nested Connection with which to execute INSERT statements.private void
pushUUIDnoChildren
(UUID uuid) helper method, which pushes the UUID, "number of Children" times onto the UUIDStack.void
reset()
This method resets the visitor.void
setNumberOfChildren
(int noChildren) this method only stores the current number of children of the current explained node.void
visit
(ResultSetStatistics statistics) Visit this node, calling back to it to get details.
-
Field Details
-
no_call_stmts
private boolean no_call_stmts -
lcc
-
dd
-
activation
-
considerTimingInformation
private boolean considerTimingInformation -
stmt
-
stmtTimings
-
stmtUUID
-
rsets
-
rsetsTimings
-
sortrsets
-
scanrsets
-
noChildren
private int noChildren -
UUIDStack
-
-
Constructor Details
-
XPLAINSystemTableVisitor
public XPLAINSystemTableVisitor()
-
-
Method Details
-
pushUUIDnoChildren
helper method, which pushes the UUID, "number of Children" times onto the UUIDStack.- Parameters:
uuid
- the UUID to push
-
setNumberOfChildren
public void setNumberOfChildren(int noChildren) this method only stores the current number of children of the current explained node. The child nodes then can re-use this information.- Specified by:
setNumberOfChildren
in interfaceXPLAINVisitor
- Parameters:
noChildren
- the number of children of the current explained node.
-
visit
Visit this node, calling back to it to get details. This method visits the RS Statisitcs node, calling back to the node to get detailed descriptor information about it.- Specified by:
visit
in interfaceXPLAINVisitor
- Parameters:
statistics
- the statistics, which want to get explained.
-
reset
public void reset()This method resets the visitor. Gets called right before explanation to make sure all needed objects exist and are up to date and the lists are cleared- Specified by:
reset
in interfaceXPLAINVisitor
-
doXPLAIN
the interface method, which gets called by the Top-ResultSet, which starts the tree traversal.- Specified by:
doXPLAIN
in interfaceXPLAINVisitor
- Throws:
StandardException
-
clean
private void clean()This method cleans up things after explanation. It frees kept resources and still holded references. -
getDefaultConn
Open a nested Connection with which to execute INSERT statements.- Throws:
SQLException
-
addStmtDescriptorsToSystemCatalog
This method writes only the stmt and its timing descriptor to the dataDictionary- Throws:
StandardException
SQLException
-
addArraysToSystemCatalogs
This method writes the created descriptor arrays to the cooresponding system catalogs.- Throws:
StandardException
SQLException
-