pg 10多级分区表(range_list)配置查询

-- define partitioned table: t_range_list

create table t_range_list(id bigserial, tenant_id int, crt_time timestamp) partition by list ( mod(tenant_id, 10));

-- level 1 : list-- list ( mod(tenant_id, 10))

create table t_range_list_0 partition of t_range_list (id, tenant_id, crt_time ) for values in (0) partition by range (crt_time);

create table t_range_list_1 partition of t_range_list (id, tenant_id, crt_time ) for values in (1) partition by range (crt_time);

create table t_range_list_2 partition of t_range_list (id, tenant_id, crt_time ) for values in (2) partition by range (crt_time);

create table t_range_list_3 partition of t_range_list (id, tenant_id, crt_time ) for values in (3) partition by range (crt_time);

create table t_range_list_4 partition of t_range_list (id, tenant_id, crt_time ) for values in (4) partition by range (crt_time);

create table t_range_list_5 partition of t_range_list (id, tenant_id, crt_time ) for values in (5) partition by range (crt_time);

create table t_range_list_6 partition of t_range_list (id, tenant_id, crt_time ) for values in (6) partition by range (crt_time);

create table t_range_list_7 partition of t_range_list (id, tenant_id, crt_time ) for values in (7) partition by range (crt_time);

create table t_range_list_8 partition of t_range_list (id, tenant_id, crt_time ) for values in (8) partition by range (crt_time);

create table t_range_list_9 partition of t_range_list (id, tenant_id, crt_time ) for values in (9) partition by range (crt_time);

-- level 2 : range-- range (crt_time)

-- t_range_list_0

create table t_range_list_0_201701 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_0_201702 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_0_201703 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_0_201704 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_0_201705 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_0_201706 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_0_201707 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_0_201708 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_0_201709 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_0_201710 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_0_201711 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_0_201712 partition of t_range_list_0 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_1

create table t_range_list_1_201701 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_1_201702 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_1_201703 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_1_201704 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_1_201705 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_1_201706 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_1_201707 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_1_201708 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_1_201709 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_1_201710 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_1_201711 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_1_201712 partition of t_range_list_1 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_2;

create table t_range_list_2_201701 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_2_201702 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_2_201703 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_2_201704 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_2_201705 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_2_201706 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_2_201707 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_2_201708 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_2_201709 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_2_201710 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_2_201711 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_2_201712 partition of t_range_list_2 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_3;

create table t_range_list_3_201701 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_3_201702 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_3_201703 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_3_201704 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_3_201705 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_3_201706 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_3_201707 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_3_201708 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_3_201709 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_3_201710 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_3_201711 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_3_201712 partition of t_range_list_3 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_4;

create table t_range_list_4_201701 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_4_201702 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_4_201703 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_4_201704 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_4_201705 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_4_201706 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_4_201707 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_4_201708 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_4_201709 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_4_201710 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_4_201711 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_4_201712 partition of t_range_list_4 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_5;

create table t_range_list_5_201701 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_5_201702 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_5_201703 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_5_201704 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_5_201705 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_5_201706 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_5_201707 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_5_201708 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_5_201709 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_5_201710 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_5_201711 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_5_201712 partition of t_range_list_5 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_6;

create table t_range_list_6_201701 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_6_201702 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_6_201703 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_6_201704 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_6_201705 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_6_201706 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_6_201707 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_6_201708 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_6_201709 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_6_201710 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_6_201711 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_6_201712 partition of t_range_list_6 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_7;

create table t_range_list_7_201701 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_7_201702 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_7_201703 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_7_201704 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_7_201705 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_7_201706 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_7_201707 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_7_201708 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_7_201709 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_7_201710 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_7_201711 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_7_201712 partition of t_range_list_7 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_8;

create table t_range_list_8_201701 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_8_201702 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_8_201703 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_8_201704 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_8_201705 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_8_201706 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_8_201707 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_8_201708 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_8_201709 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_8_201710 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_8_201711 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_8_201712 partition of t_range_list_8 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- t_range_list_9;

create table t_range_list_9_201701 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-01-01‘) to (‘2017-02-01‘);

create table t_range_list_9_201702 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-02-01‘) to (‘2017-03-01‘);

create table t_range_list_9_201703 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-03-01‘) to (‘2017-04-01‘);

create table t_range_list_9_201704 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-04-01‘) to (‘2017-05-01‘);

create table t_range_list_9_201705 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-05-01‘) to (‘2017-06-01‘);

create table t_range_list_9_201706 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-06-01‘) to (‘2017-07-01‘);

create table t_range_list_9_201707 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-07-01‘) to (‘2017-08-01‘);

create table t_range_list_9_201708 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-08-01‘) to (‘2017-09-01‘);

create table t_range_list_9_201709 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-09-01‘) to (‘2017-10-01‘);

create table t_range_list_9_201710 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-10-01‘) to (‘2017-11-01‘);

create table t_range_list_9_201711 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-11-01‘) to (‘2017-12-01‘);

create table t_range_list_9_201712 partition of t_range_list_9 (id  primary key, tenant_id , crt_time ) for values from (‘2017-12-01‘) to (‘2018-01-01‘);

-- insert test data:

insert into t_range_list(tenant_id,crt_time) values(10110,‘2017-01-01 09:10:30‘),(10111,‘2017-02-01 09:10:30‘),(10112,‘2017-03-01 09:10:30‘),(10113,‘2017-04-01 09:10:30‘),

(10114,‘2017-05-01 09:10:30‘),(10115,‘2017-06-01 09:10:30‘),(10116,‘2017-07-01 09:10:30‘),(10118,‘2017-08-01 09:10:30‘),

(10119,‘2017-09-01 09:10:30‘),(10120,‘2017-10-01 09:10:30‘),(10121,‘2017-11-01 09:10:30‘),(10122,‘2017-12-01 09:10:30‘)

--excute SQL Select

pdb=# explain analyze select * from t_range_list

where mod(tenant_id, 10)=mod(10112, 10)

and crt_time=‘2017-03-01 09:10:30‘;

QUERY PLAN

-----------------------------------------------------------------------------------------------------------------------

Append  (cost=0.00..39.75 rows=1 width=20) (actual time=0.015..0.016 rows=1 loops=1)

->  Seq Scan on t_range_list_2_201703  (cost=0.00..39.75 rows=1 width=20) (actual time=0.014..0.015 rows=1 loops=1)

Filter: ((crt_time = ‘2017-03-01 09:10:30‘::timestamp without time zone) AND (mod(tenant_id, 10) = 2))

Planning time: 5.177 ms

Execution time: 0.047 ms

(5 rows)

pdb=#

时间: 2024-11-08 23:47:34

pg 10多级分区表(range_list)配置查询的相关文章

pg 10 wal 归档同步配置

一.rsync server(172.16.3.226) CentOS 7.2 X64 # yum install -y rsync # mkdir -p -m 0700 /db/wal_archive # chown -R postgres.postgres /db/wal_archive 可能存在的问题: 修改目录/db/wal_archive权限后仍报错如下: rsync: mkstemp "/.000000010000000000000001.2Z6cX4" (in archi

Oracle分区表的层次查询如何才能用到分区?

最近在调优分区表的层次查询时,发现用不到分区,做了一个实验,发现还是可以用的到的,只是写法上有些要求. drop table test; create table test ( id  number primary key, parent_id number, name varchar2(20), code varchar2(4) ) partition by list(code) ( partition p1 values('0301'), partition p2 values('0302'

mac 10.9.4下配置apache

mac 10.9.x已经自带了apache,可按如下步骤开启: 1.启动 sudo apachectl start 启动后,访问 http://localhost/ 应该能看到"It works!"的初始页面,如果对初始页面的内容感到好奇,可以打开"/etc/apache2/httpd.conf",197行可以看到如下代码片段: 1 <Directory "/Library/WebServer/Documents"> 2 # 3 #

Ubuntu14.10+cuda7.0+caffe配置

Ubuntu14.10+cuda7.0+caffe配置 一:linux安装 Linux安装不说了.我这里安装的是ubuntu14.10 二:nVidia驱动和CUDA Toolkit的安装和调试(*.run方法) 1: Verify You Have a CUDA-Capable GPU 运行以下的操作,然后验证硬件支持GPU CUDA.仅仅要型号存在于https://developer.nvidia.com/cuda-gpus.就没问题了 $ lspci | grep -i nvidia 2:

VMware Workstation 10.0 安装与配置

VMware Workstation 10.0虚拟机 1.先安装VMware Workstation 10.0原版, 2.然后用下面的任意一个VMware Workstation序列号注册(或者你也可以用注册工具) 1Y0LW-4WJ9N-LZ5G9-Z81QP-92PN7 JU052-F4J41-HZGM8-QU056-93P6Y 0Y6DK-8H1DH-UZ249-X2A5M-3AM2M MA664-AF2E5-6ZAD9-GU15K-1AR1N 3,新建一个VMware的虚拟机 ultra

Apache, MySQL, phpMyAdmin在Mac OS X 10.9 下的配置

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Command: mysql_secure_installation +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMEND

Cisco PT模拟实验(10) 路由器的基本配置

Cisco PT模拟实验(10) 路由器的基本配置 实验目的: 掌握路由器几种常用配置方法 熟悉路由器不同的命令行操作模式 掌提路由器的基本配置命令 实验背景: 作为网络管理员,你第一次在设备机房对路由器进行了初次配置后,希望以后在办公室或出差时也可以对设备进行远程管理,现要在路由器上做适当配置. 技术原理: 路由器:一种用于连接因特网中各局域网.广域网,负责分组转发.路由选择的三层网络互联设备.根据信道的情况自动选择和设定路由,以最佳路径,按前后顺序发送信号. 与二层交换机的最大区别,体现在其

MDT2012部署系列之10 WDS安装与配置

(十二).WDS服务器安装 通过前面的测试我们会发现,每次安装的时候需要加域光盘映像,这是一个比较麻烦的事情,试想一个上万个的公司,你天天带着一个光盘与光驱去给别人装系统,这将是一个多么痛苦的事情啊,有什么方法可以解决这个问题了?答案是肯定的,下面我们就来简单说一下. WDS服务器,它是Windows自带的一个免费的基于系统本身角色的一个功能,它主要提供一种简单.安全的通过网络快速.远程将Windows操作系统部署到计算机上的方法.简单一点说就是通过PXE进行启动,然后进行系统的安装.下面我们来

ArcSDE 10.1安装、配置、连接 (SQL Server 2008)

转自:http://blog.csdn.net/esrichinacd/article/details/8510224 1  概述 ArcSDE 10.1的安装配置相较于ArcSDE 10.0和之前版本,有了一些显著的变化,比如取消了Post Install向导,很多之前的管理操作改为使用地理处理工具来执行.很多用户初次接触很不适应,本文就为大家介绍如何安装.配置和连接ArcSDE 10.1,测试数据库选择的是Microsoft SQL Server 2008 R2 Enterprise Edi