@@ -43,7 +43,7 @@ const (
43
43
44
44
// Explain runs an explain query.
45
45
func Explain (ctx context.Context , msgSvc connection.Messenger , command * platform.Command , msg * models.Message ,
46
- explainConfig pgexplain. ExplainConfig , session usermanager.UserSession ) error {
46
+ session usermanager.UserSession ) error {
47
47
if command .Query == "" {
48
48
return errors .New (MsgExplainOptionReq )
49
49
}
@@ -100,7 +100,7 @@ func Explain(ctx context.Context, msgSvc connection.Messenger, command *platform
100
100
command .PlanExecJSON = explainAnalyze
101
101
102
102
// Visualization.
103
- explain , err := pgexplain .NewExplain (explainAnalyze , explainConfig )
103
+ explain , err := pgexplain .NewExplain (explainAnalyze )
104
104
if err != nil {
105
105
log .Err ("Explain parsing: " , err )
106
106
@@ -156,32 +156,6 @@ func Explain(ctx context.Context, msgSvc connection.Messenger, command *platform
156
156
return err
157
157
}
158
158
159
- // Recommendations.
160
- tips , err := explain .GetTips ()
161
- if err != nil {
162
- log .Err ("Recommendations: " , err )
163
- return err
164
- }
165
-
166
- recommends := ""
167
- if len (tips ) == 0 {
168
- recommends += ":white_check_mark: Looks good"
169
- } else {
170
- for _ , tip := range tips {
171
- recommends += fmt .Sprintf (
172
- ":exclamation: %s – %s <%s|Show details>\n " , tip .Name ,
173
- tip .Description , tip .DetailsUrl )
174
- }
175
- }
176
-
177
- command .Recommendations = recommends
178
-
179
- msg .AppendText ("*Recommendations:*\n " + recommends )
180
- if err = msgSvc .UpdateText (msg ); err != nil {
181
- log .Err ("Show recommendations: " , err )
182
- return err
183
- }
184
-
185
159
// Summary.
186
160
stats := explain .RenderStats ()
187
161
command .Stats = stats
0 commit comments