File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,15 @@ select query_hash from sr_plans where query_hash=1000+_p(11);
69
69
select query_hash from sr_plans where query_hash= 1000 + _p(- 5 );
70
70
```
71
71
72
- ## Explain
72
+ ## EXPLAIN for saved plans
73
73
74
74
It is possible to see saved plans by using ` show_plan ` function. It requires
75
75
knowing query hash which could be fetched from ` sr_plans ` table.
76
76
77
77
Examples:
78
78
79
+ Show enabled plan for query hash:
80
+
79
81
``` SQL
80
82
SELECT show_plan(1 );
81
83
show_plan
@@ -86,7 +88,7 @@ SELECT show_plan(1);
86
88
(3 rows)
87
89
```
88
90
89
- Get second plan:
91
+ Get second saved plan by using ` index ` parameter (ignores ` enable ` attribute) :
90
92
91
93
``` SQL
92
94
SELECT show_plan(1 , index := 2 );
@@ -98,7 +100,7 @@ SELECT show_plan(1, index := 2);
98
100
(3 rows)
99
101
```
100
102
101
- Use another output format (supported formats are ` json ` , ` text ` , ` xml ` ):
103
+ Use another output format (supported formats are ` json ` , ` text ` , ` xml ` , ` yaml ` ):
102
104
103
105
``` SQL
104
106
SELECT show_plan(1 , format := ' json' );
You can’t perform that action at this time.
0 commit comments