We have 8 millions records in one table, I build 10 nodes for this cluster with the latest version(CockroachDB V2.0 20180326). the same query show the poor performance comparing with mysql database. the same query in cockroachDB need about 6 seconds, but in mysql, it just need 100ms. I confirmed the right indexes were build with the sql explain result below.
Is it possible to improve the single query time into 1 second? Which approach I can try?
±------------------------±------±---------------------------------------------------------------+
| Tree | Field | Description |
±------------------------±------±---------------------------------------------------------------+
| limit | | |
| └── render | | |
| └── index-join | | |
| ├── scan | | |
| │ | table | t_sync_data@t_sync_data_last_sync_id_user_id_data_type_idx |
| │ | spans | /1/"!\xcd\x19\xe4\x83}K\xffJv\xae\xfa\r\xdb\xecd"/“highlight”- |
| └── scan | | |
| | table | t_sync_data@primary |
±------------------------±------±---------------------------------------------------------------+
(8 rows)