You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
COMMENT ON FUNCTION public.show_execution_time(boolean) IS
139
+
COMMENT ON FUNCTION public.aqo_execution_time(boolean) IS
135
140
'Get execution time of queries. If controlled = true (AQO could advise cardinality estimations), show time of last execution attempt. Another case (AQO not used), return an average value of execution time across all known executions.';
136
141
137
-
CREATE OR REPLACEFUNCTIONpublic.aqo_drop_class(idbigint)
142
+
--
143
+
-- Remove all information about a query class from AQO storage.
144
+
--
145
+
CREATE OR REPLACEFUNCTIONpublic.aqo_drop_class(queryidbigint)
138
146
RETURNSintegerAS $$
139
147
DECLARE
140
148
fsbigint;
141
149
numinteger;
142
150
BEGIN
143
-
IF (id=0) THEN
144
-
raise EXCEPTION'[AQO] Cannot remove basic class %.',id;
151
+
IF (queryid=0) THEN
152
+
raise EXCEPTION'[AQO] Cannot remove basic class %.',queryid;
145
153
END IF;
146
154
147
-
SELECT fspace_hashFROMpublic.aqo_queriesWHERE (query_hash=id) INTO fs;
155
+
SELECT fspace_hashFROMpublic.aqo_queriesWHERE (query_hash=queryid) INTO fs;
148
156
149
157
IF (fs ISNULL) THEN
150
-
raise WARNING'[AQO] Nothing to remove for the class %.',id;
158
+
raise WARNING'[AQO] Nothing to remove for the class %.',queryid;
151
159
RETURN0;
152
160
END IF;
153
161
154
-
IF (fs<>id) THEN
155
-
raise WARNING'[AQO] Removing query class has non-generic feature space value: id = %, fs = %.',id, fs;
162
+
IF (fs<>queryid) THEN
163
+
raise WARNING'[AQO] Removing query class has non-generic feature space value: id = %, fs = %.',queryid, fs;
156
164
END IF;
157
165
158
166
SELECTcount(*)FROMpublic.aqo_dataWHERE fspace_hash= fs INTO num;
@@ -161,7 +169,7 @@ BEGIN
161
169
* Remove the only from aqo_queries table. All other data will be removed by
Get execution time of queries. If controlled = true (AQO could advise cardinality estimations), show time of last execution attempt. Another case (AQO not used), return an average value of execution time across all known executions.