You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am doing performance analysis of a join query. Access to one of the joined table is counted in I_S.ROCKSDB_PERF_CONTEXT. Access to the second one is not. This is very confusing.
Steps to reproduce:
Step 1 : create the test dataset and set rocksdb_perf_context_level=3:
insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table one_k(a int);
insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
set rocksdb_max_row_locks=1000*1000*1000;
set rocksdb_commit_in_the_middle=1;
create table t20 (pk int primary key, a int) engine=rocksdb;
create table t21 (pk int primary key, a int) engine=rocksdb;
SET rocksdb_perf_context_level=3;
insert into t20 select A.a+1000*B.a, A.a+1000*B.a from one_k A, ten B;
insert into t21 select A.a+1000*B.a, A.a+1000*B.a from one_k A, ten B;
set global rocksdb_force_flush_memtable_now=1;
Step2: save Perf Context counter values
create temporary table run1_start as
select * from information_schema.ROCKSDB_PERF_CONTEXT
where table_name in ('t20', 't21');
# This shows: Query OK, 114 rows affected (0.00 sec)
Step3: run the query. Let's check the EXPLAIN first.
set join_buffer_size=500*1024*1024;
explain
select count(*) from t20,t21 where t20.a=t21.a;
This is actually intentional. ha_rocksdb.cc has this:
to maintain perf_context on a per table basis. Therefore, roll all
perf_context data into the first table used in a query. This works well
for single table queries and is probably good enough for queries that hit
multiple tables.
I am doing performance analysis of a join query. Access to one of the joined table is counted in I_S.ROCKSDB_PERF_CONTEXT. Access to the second one is not. This is very confusing.
Steps to reproduce:
Step 1 : create the test dataset and set rocksdb_perf_context_level=3:
Step2: save Perf Context counter values
Step3: run the query. Let's check the EXPLAIN first.
Ok, it's going to do a full table scan on both tables. Depending on the buffer size, the second table can be scanned multiple times.
Run the query:
Step4: Save the counter values after query:
Step 5: check counter increments. First, lets' check table t20:
There are some non-zero increments. No problem so far.
Now, let's check t21:
ALL counters had zero increments. I think this is wrong.
The text was updated successfully, but these errors were encountered: