Replies: 1 comment
-
Wrong for MV, in ClickHouse MV it's more insert trigger. There is refresh MV(experimental), which act like "normal" MV from PosgreSQL for ex https://clickhouse.com/docs/en/sql-reference/statements/create/view#refreshable-materialized-view |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all.
I just recently started studying ClickHouse, so I ask you to be lenient with the question.
Created a table to store all article visitors and record viewing progress:
I also created a MATERIALIZED VIEW table for it:
I can’t understand why in the MATERIALIZED VIEW table
views_count
, even after recalculation, is always equal to 1 for each uniquepublication_id
andcreated_at_hour
? To make it clearer, let me clarify: for example, I add 2 records with obviously unique data. If I run a query from my MATERIALIZED VIEW:then I get
views_count
with the value 2. However, the MATERIALIZED VIEW table stores the value 1 even after recalculation. Why does this work this way and how can it be fixed?Beta Was this translation helpful? Give feedback.
All reactions