-
Notifications
You must be signed in to change notification settings - Fork 461
/
Copy pathschema_vda.sql
34 lines (30 loc) · 1.34 KB
/
schema_vda.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
create table vda_file (
id integer not null auto_increment,
create_time double not null default 0,
dir varchar(254) not null,
file_name varchar(254) not null,
size double not null default 0,
chunk_size double not null default 0,
need_update tinyint not null default 0,
initialized tinyint not null default 0,
retrieving tinyint not null default 0,
retrieved tinyint not null default 0,
primary key(id)
) engine = InnoDB;
alter table vda_file add unique(file_name);
create table vda_chunk_host (
create_time double not null default 0,
vda_file_id integer not null default 0,
host_id integer not null default 0,
physical_file_name varchar(254) not null,
present_on_host tinyint not null default 0,
transfer_in_progress tinyint not null default 0,
transfer_wait tinyint not null default 0,
transfer_request_time double not null default 0,
transfer_send_time double not null default 0
) engine = InnoDB;
alter table vda_chunk_host
add index vch_file (vda_file_id),
add index vch_host (host_id);
alter table host
add index host_cpu_eff (cpu_efficiency);