sprintf "CREATE TABLE %s (
source varchar(255) binary not null,
h_occurrence varchar(255) binary not null,
- h_position varchar(255) binary not null,
+ h_position varchar(62) binary not null,
h_depth integer
);" name]
let sprintf_refSort_format name = [
sprintf "CREATE TABLE %s (
source varchar(255) binary not null,
- h_position varchar(255) binary not null,
+ h_position varchar(62) binary not null,
h_depth integer not null,
- h_sort varchar(255) binary not null
+ h_sort varchar(5) binary not null
);" name]
let sprintf_refRel_format name = [
sprintf "CREATE TABLE %s (
source varchar(255) binary not null,
- h_position varchar(255) binary not null,
+ h_position varchar(62) binary not null,
h_depth integer not null
);" name]
(* INDEXES *)
let sprintf_refObj_index name = [
-sprintf "CREATE INDEX %s_source ON %s (source);" name name ;
-sprintf "CREATE INDEX %s_target ON %s (h_occurrence);" name name ;
-sprintf "CREATE INDEX %s_position ON %s (h_position);" name name ]
+sprintf "CREATE INDEX %s_index ON %s (source(219),h_occurrence(219),h_position);" name name ]
let sprintf_refSort_index name = [
-sprintf "CREATE INDEX %s_source ON %s (source);" name name]
+sprintf "CREATE INDEX %s_index ON %s (source,h_sort,h_position,h_depth);" name name]
let sprintf_objectName_index name = [
sprintf "CREATE INDEX %s_value ON %s (value);" name name]
sprintf "CREATE INDEX %s_statement ON %s (statement);" name name]
let sprintf_refRel_index name = [
-sprintf "CREATE INDEX %s_source ON %s (source);" name name
-]
+sprintf "CREATE INDEX %s_index ON %s (source,h_position,h_depth);" name name]
let sprintf_refObj_index_drop name = [
-sprintf "DROP INDEX %s_source ON %s;" name name ;
-sprintf "DROP INDEX %s_target ON %s;" name name ;
-sprintf "DROP INDEX %s_position ON %s;" name name ]
+sprintf "DROP INDEX %s_index ON %s;" name name ]
let sprintf_refSort_index_drop name = [
-sprintf "DROP INDEX %s_source ON %s;" name name ]
+sprintf "DROP INDEX %s_index ON %s;" name name ]
let sprintf_objectName_index_drop name = [
sprintf "DROP INDEX %s_value ON %s;" name name]
sprintf "DROP INDEX %s_statement ON %s;" name name]
let sprintf_refRel_index_drop name = [
-sprintf "DROP INDEX %s_source ON %s;" name name]
+sprintf "DROP INDEX %s_index ON %s;" name name]
let sprintf_rename_table oldname newname = [
sprintf "RENAME TABLE %s TO %s;" oldname newname