pingcap / tidb-docker-compose

Apache License 2.0
351 stars 155 forks source link

TiFlash docker compose #89

Open Ishiihara opened 4 years ago

Ishiihara commented 4 years ago

Note: You may need to provide enough resources for docker. For example, 8 CPUs and 10GB memory.

Here is the instruction to test:

Start the services: $docker-compose -f docker-compose-tiflash-nightly.yml pull $docker-compose -f docker-compose-tiflash-nightly.yml up -d

Connect to TiDB (you may need to wait a minute or so to wait for everything to start) $mysql -h 127.0.0.1 -P 4000 -u root

Test TiFlash

use test;
drop table t;

create table t (c1 int, c2 varchar(64));
insert into t values(1, "abc");

insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;
insert into t select * from t;

ALTER TABLE t SET TIFLASH REPLICA 1;

explain analyze select * from t;

select count(*) from t;

SELECT * FROM information_schema.tiflash_replica;

set @@session.tidb_isolation_read_engines='tiflash';

explain analyze select * from t;

To stop services: $docker-compose -f docker-compose-tiflash-nightly.yml stop

Anutrix commented 2 years ago

Any reason why this is not merged?

pencal commented 9 months ago

+1. this will be extremely useful for me to eval tiflash.