Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
5.5.0
Description
Query:
SELECT COUNT(*) from reviews
|
where stars > 4
|
group by stars;
|
is running slower than
SELECT COUNT(*) from reviews
|
group by stars;
|
--------------------------
Cluster: 2 nodes
Node 1: KV, Analytics, Node 2: KV, Analytics
setup:
1. YELP reviews dataset
CREATE BUCKET YELP WITH \{"name":"YELP"};
|
CREATE SHADOW DATASET reviews ON YELP WHERE `type` = "review";
|
connect BUCKET YELP;
|
– then ingest ~120M docs into KV
– create indexes
create index r_user_id on reviews(user_id:STRING);
|
create index r_stars on review(stars:STRING);
|