I have set up a database with a table of approximately 100GB. I use 4cpu and 15GB ram on the gcs. When I make a query I can see from the read/write operations dashboards that only a few hundred lines are read per second which will take forever to complete.
the query is done on DBeaver, it is not a complicated query as can be seen from the picture attached. I simply do not understand why it is so slow??
the query is simply this:
"""INSERT INTO analytics_agg (
hash,
product,
interface,
click_time_0,
click_time_5,
click_time_10,
click_time_30,
click_time_60)
SELECT
hash,
product,
interface,
count(case when click_time=0 then 1 else 0 end) ,
count(case when click_time=5 then 1 else 0 end) ,
count(case when click_time=10 then 1 else 0 end) ,
count(case when click_time=30 then 1 else 0 end) ,
count(case when click_time=60 then 1 else 0 end)
FROM analytics
group by hash,product,interface """
question from:
https://stackoverflow.com/questions/65894917/google-cloud-storage-mysql-query-reads-only-a-few-hundred-lines-per-second 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…