Good day.
Decided to use ClickHouse for analytics. I register about 30 000 000 events per month. I have several different types of events, all of them have a part of attributes that is the same, so I decided to create one main table and for each type of event my own additional one with a unique set of columns. But JOIN turned out to be overwhelming.
Now I think over two schemes
- One big table in which there will be ALL columns of ALL types of events
- each type of event will have its own table with a full set of columns
for example
- event "visited page" has columns: date of visit, URL, REFER, user ID, session ID
- event "put in the basket" has columns: date and time, product ID, quantity of goods, URL of the page, user ID, session ID
- the event "removed goods from the cart" has columns: date and time, product ID, page URL, user ID, session ID
What is better to choose, can you advise?