Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2f4ce3c

Browse files
svglukhovdanolivo
authored andcommitted
Added functions:
aqo_query_texts_update(), aqo_query_stat_update(), aqo_data_update(). Changed function to be able to insert a record: aqo_queries_update().
1 parenteb1f545 commit2f4ce3c

12 files changed

+1127
-55
lines changed

‎aqo--1.5--1.6.sql

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,50 @@ AS 'MODULE_PATHNAME', 'aqo_cleanup'
3030
LANGUAGE C STRICT VOLATILE;
3131
COMMENT ON FUNCTION aqo_cleanup() IS
3232
'Remove unneeded rows from the AQO ML storage';
33+
34+
--
35+
-- Update or insert an aqo_query_texts
36+
-- table record for given 'queryid'.
37+
--
38+
39+
CREATEFUNCTIONaqo_query_texts_update(
40+
queryidbigint, query_texttext)
41+
RETURNS bool
42+
AS'MODULE_PATHNAME','aqo_query_texts_update'
43+
LANGUAGE C VOLATILE;
44+
45+
--
46+
-- Update or insert an aqo_query_stat
47+
-- table record for given 'queryid'.
48+
--
49+
50+
CREATEFUNCTIONaqo_query_stat_update(
51+
queryidbigint,
52+
execution_time_with_aqodouble precision[],
53+
execution_time_without_aqodouble precision[],
54+
planning_time_with_aqodouble precision[],
55+
planning_time_without_aqodouble precision[],
56+
cardinality_error_with_aqodouble precision[],
57+
cardinality_error_without_aqodouble precision[],
58+
executions_with_aqobigint,
59+
executions_without_aqobigint)
60+
RETURNS bool
61+
AS'MODULE_PATHNAME','aqo_query_stat_update'
62+
LANGUAGE C VOLATILE;
63+
64+
--
65+
-- Update or insert an aqo_data
66+
-- table record for given 'fs' & 'fss'.
67+
--
68+
69+
CREATEFUNCTIONaqo_data_update(
70+
fsbigint,
71+
fssinteger,
72+
nfeaturesinteger,
73+
featuresdouble precision[][],
74+
targetsdouble precision[],
75+
reliabilitydouble precision[],
76+
oidsOid[])
77+
RETURNS bool
78+
AS'MODULE_PATHNAME','aqo_data_update'
79+
LANGUAGE C VOLATILE;

‎auto_tuning.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,10 @@ automatical_query_tuning(uint64 queryid, StatEntry *stat)
202202

203203
if (num_iterations <=auto_tuning_max_iterations||p_use>0.5)
204204
aqo_queries_store(queryid,query_context.fspace_hash,
205-
query_context.learn_aqo,query_context.use_aqo, true);
205+
query_context.learn_aqo,query_context.use_aqo, true,
206+
&aqo_queries_nulls);
206207
else
207208
aqo_queries_store(queryid,
208-
query_context.fspace_hash, false, false, false);
209+
query_context.fspace_hash, false, false, false,
210+
&aqo_queries_nulls);
209211
}

‎expected/plancache.out

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,10 @@ SELECT * FROM f1();
4444

4545
DROP FUNCTION f1;
4646
DROP TABLE test CASCADE;
47+
SELECT true FROM aqo_reset();
48+
bool
49+
------
50+
t
51+
(1 row)
52+
4753
DROP EXTENSION aqo;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp