Created
August 19, 2020 20:24
-
-
Save nirbhayc/85afa5b593128b9fb75213de49be22fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cdb2sql> create table t1(i int)$$ | |
[create table t1(i int)] rc 0 | |
cdb2sql> insert into t1 select * from generate_series(1,10); | |
(rows inserted=10) | |
[insert into t1 select * from generate_series(1,10)] rc 0 | |
$ comdb2sql -cost nctdb "select * from t1 order by 1" | |
(i=1) | |
(i=2) | |
(i=3) | |
(i=4) | |
(i=5) | |
(i=6) | |
(i=7) | |
(i=8) | |
(i=9) | |
(i=10) | |
------------------ | |
nctdb: | |
total time: 6 ms | |
connections: 1 | |
query: " select * from t1 order by 1" | |
time 6ms | |
rows 10 | |
cost 23 | |
table t1 finds 1 next/prev 10 [TABLE SCAN] | |
temp index next/prev 10 writes 10 | |
Please see {WIKI COMDB2/QUERYCOST<go>} for an explanation | |
Run your query with 'comdb2sqlexplain' to see the full query plan | |
------------------ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment