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

Commitedfa892

Browse files
funbringerdanolivo
authored andcommitted
inplace fix for release 1.0
1 parent5567135 commitedfa892

File tree

1 file changed

+33
-40
lines changed

1 file changed

+33
-40
lines changed

‎aqo--1.0.sql‎

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,51 @@
22
\echo Use"CREATE EXTENSION aqo" to load this file. \quit
33

44
CREATETABLEaqo_queries (
5-
query_hashintPRIMARY KEY,
6-
learn_aqobooleanNOT NULL,
7-
use_aqobooleanNOT NULL,
8-
fspace_hashintNOT NULL,
9-
auto_tuningbooleanNOT NULL
5+
query_hashint4CONSTRAINT"aqo_queries_query_hash_idx"
6+
PRIMARY KEY,
7+
learn_aqoboolNOT NULL,
8+
use_aqoboolNOT NULL,
9+
fspace_hashint4NOT NULL,
10+
auto_tuningboolNOT NULL
1011
);
1112

1213
CREATETABLEaqo_query_texts (
13-
query_hashintPRIMARY KEYREFERENCES aqo_queriesON DELETE CASCADE,
14-
query_textvarcharNOT NULL
14+
query_hashint4CONSTRAINT"aqo_query_texts_query_hash_idx"
15+
PRIMARY KEYREFERENCES aqo_queriesON DELETE CASCADE,
16+
query_texttextNOT NULL
1517
);
1618

1719
CREATETABLEaqo_query_stat (
18-
query_hashintPRIMARY KEYREFERENCES aqo_queriesON DELETE CASCADE,
19-
execution_time_with_aqodouble precision[],
20-
execution_time_without_aqodouble precision[],
21-
planning_time_with_aqodouble precision[],
22-
planning_time_without_aqodouble precision[],
23-
cardinality_error_with_aqodouble precision[],
24-
cardinality_error_without_aqodouble precision[],
25-
executions_with_aqobigint,
26-
executions_without_aqobigint
20+
query_hashint4CONSTRAINT"aqo_query_stat_idx"
21+
PRIMARY KEYREFERENCES aqo_queriesON DELETE CASCADE,
22+
execution_time_with_aqofloat8[],
23+
execution_time_without_aqofloat8[],
24+
planning_time_with_aqofloat8[],
25+
planning_time_without_aqofloat8[],
26+
cardinality_error_with_aqofloat8[],
27+
cardinality_error_without_aqofloat8[],
28+
executions_with_aqoint8,
29+
executions_without_aqoint8
2730
);
2831

2932
CREATETABLEaqo_data (
30-
fspace_hashintNOT NULLREFERENCES aqo_queriesON DELETE CASCADE,
31-
fsspace_hashintNOT NULL,
32-
nfeaturesintNOT NULL,
33-
featuresdouble precision[][],
34-
targetsdouble precision[],
35-
UNIQUE (fspace_hash, fsspace_hash)
33+
fspace_hashint4NOT NULLREFERENCES aqo_queriesON DELETE CASCADE,
34+
fsspace_hashint4NOT NULL,
35+
nfeaturesint4NOT NULL,
36+
featuresfloat8[][],
37+
targetsfloat8[]
3638
);
3739

38-
CREATEINDEXaqo_queries_query_hash_idxON aqo_queries (query_hash);
39-
CREATEINDEXaqo_query_texts_query_hash_idxON aqo_query_texts (query_hash);
40-
CREATEINDEXaqo_query_stat_idxON aqo_query_stat (query_hash);
41-
CREATEINDEXaqo_fss_access_idxON aqo_data (fspace_hash, fsspace_hash);
40+
CREATEUNIQUE INDEXaqo_fss_access_idxON aqo_data (fspace_hash, fsspace_hash);
4241

43-
ALTERTABLE aqo_data ALTER COLUMN featuresSET STORAGE MAIN;
44-
ALTERTABLE aqo_data ALTER COLUMN targetsSET STORAGE MAIN;
45-
ALTERTABLE aqo_query_stat
46-
ALTER COLUMN execution_time_with_aqoSET STORAGE MAIN;
47-
ALTERTABLE aqo_query_stat
48-
ALTER COLUMN execution_time_without_aqoSET STORAGE MAIN;
49-
ALTERTABLE aqo_query_stat
50-
ALTER COLUMN planning_time_with_aqoSET STORAGE MAIN;
51-
ALTERTABLE aqo_query_stat
52-
ALTER COLUMN planning_time_without_aqoSET STORAGE MAIN;
53-
ALTERTABLE aqo_query_stat
54-
ALTER COLUMN cardinality_error_without_aqoSET STORAGE MAIN;
55-
ALTERTABLE aqo_query_stat
56-
ALTER COLUMN cardinality_error_with_aqoSET STORAGE MAIN;
42+
ALTERTABLE aqo_dataALTER COLUMN featuresSET STORAGE MAIN;
43+
ALTERTABLE aqo_dataALTER COLUMN targetsSET STORAGE MAIN;
44+
ALTERTABLE aqo_query_statALTER COLUMN execution_time_with_aqoSET STORAGE MAIN;
45+
ALTERTABLE aqo_query_statALTER COLUMN execution_time_without_aqoSET STORAGE MAIN;
46+
ALTERTABLE aqo_query_statALTER COLUMN planning_time_with_aqoSET STORAGE MAIN;
47+
ALTERTABLE aqo_query_statALTER COLUMN planning_time_without_aqoSET STORAGE MAIN;
48+
ALTERTABLE aqo_query_statALTER COLUMN cardinality_error_without_aqoSET STORAGE MAIN;
49+
ALTERTABLE aqo_query_statALTER COLUMN cardinality_error_with_aqoSET STORAGE MAIN;
5750

5851
INSERT INTO aqo_queriesVALUES (0, false, false,0, false);
5952
INSERT INTO aqo_query_textsVALUES (0,'COMMON feature space (do not delete!)');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp