Pushing initial work for done in Query plan feature to main (#17986)

* Adding initial boilerplate for qp2

* Adding feature flag in query plan 2

* Clearing show plan 2 after every run

* Adding sub tree cost

* removing unused method.

* WIP 2

* Adding properties view and relative cost to query plan

* WIP

* Add icons to ads

* Assing relative costs and prop windows

* Enabling older query plan again

* Making some PR fixes

* Some more PR related fixes

* Use MS org azdataGraph module

* Moving new properties to azdata proposed.

* Moving new class properties to proposed

* added missing doc component.

* Changing how azdatagraph package is referenced

* Removing empty lines, fixing localization keys

* Removing empty line, localizing some string

* making css classes more specific

* making some logic concise

* localizing some more strings

* Making more css classes specific

* Removing important tag from css props

* Checking if sum is greater than 0 to prevent divide by zero exceptions

* Fixed loader error in bootstrap

* Fixing query index

* -fixing image paths
-making css class more class specific by using nested selectors

Co-authored-by: kburtram <karlb@microsoft.com>
This commit is contained in:
Aasim Khan
2022-01-13 09:32:13 -08:00
committed by GitHub
parent 24a0605081
commit ea2860eb33
129 changed files with 882 additions and 8 deletions

View File

@@ -913,11 +913,22 @@ declare module 'azdata' {
action: ActionOnCellCheckboxCheck;
}
export interface QueryExecuteResultSetNotificationParams {
/**
* Contains query plans returned by the database in ResultSets.
*/
executionPlans: QueryPlanGraph[];
}
export interface ResultSetSummary {
/**
* The visualization options for the result set.
*/
visualization?: VisualizationOptions;
/**
* Generic query plan graph to be displayed in the results view.
*/
showplangraph?: QueryPlanGraph;
}
/**
@@ -1392,4 +1403,100 @@ declare module 'azdata' {
errors?: { message: string, property?: DesignerEditPath }[];
}
}
export interface QueryPlanGraph {
/**
* Root of the query plan tree
*/
root: QueryPlanGraphNode;
/**
* Underlying query for the query plan graph.
*/
query: string;
}
export interface QueryPlanGraphNode {
/**
* Type of the node. This property determines the icon that is displayed for it
*/
type: string;
/**
* Cost associated with the node
*/
cost: number;
/**
* Cost of the node subtree
*/
subTreeCost: number;
/**
* Relative cost of the node compared to its siblings.
*/
relativeCost: number;
/**
* Time take by the node operation in milliseconds
*/
elapsedTimeInMs: number;
/**
* Node properties to be shown in the tooltip
*/
properties: QueryPlanGraphElementProperty[];
/**
* Display name for the node
*/
name: string;
/**
* Description associated with the node.
*/
description: string;
/**
* Subtext displayed under the node name
*/
subtext: string[];
/**
* Direct children of the nodes.
*/
children: QueryPlanGraphNode[];
/**
* Edges corresponding to the children.
*/
edges: QueryGraphEdge[];
}
export interface QueryGraphEdge {
/**
* Count of the rows returned by the subtree of the edge.
*/
rowCount: number;
/**
* Size of the rows returned by the subtree of the edge.
*/
rowSize: number;
/**
* Edge properties to be shown in the tooltip.
*/
properties: QueryPlanGraphElementProperty[]
}
export interface QueryPlanGraphElementProperty {
/**
* Name of the property
*/
name: string;
/**
* Formatted value for the property
*/
formattedValue: string;
/**
* Flag to show/hide props in tooltip
*/
showInToolTip: boolean;
/**
* Display order of property
*/
displayOrder: number;
/**
* Flag to indicate if the property has a longer value so that it will be shown at the bottom of the tooltip
*/
isLongString: boolean;
}
}