Skip to content
This repository has been archived by the owner. It is now read-only.

Simplify events table schema #94

Merged
merged 1 commit into from Aug 6, 2017

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Member

commented Aug 2, 2017

See the use case described in c65e3b6:

By adding non-queryable columns to the events table that contain all of an events places and topics, we can re-build a full event just from the data that we get back from that table. This makes a number of queries easier and more performant, including the MessagesSchema.event query.

@c-w c-w requested a review from erikschlegel Aug 2, 2017

@c-w c-w added the in progress label Aug 2, 2017

@erikschlegel
Copy link
Contributor

left a comment

I considered this... Don't you already have the topics and placedids from the tags tables?

@c-w

This comment has been minimized.

Copy link
Member Author

commented Aug 3, 2017

@erikschlegel Yes we do, but then we'd have to join the tables (two trips to Cassandra) every time we fetch an event by id which increases code complexity.

Most events will have few tagged topics and places so the added storage for these two columns should be minimal. Performance impact on Cassandra should also be minimal since we're not adding the columns to a key or indexing them.

What do you think?

@c-w c-w force-pushed the events-table-update branch from 2eb9947 to aae824c Aug 3, 2017

@c-w c-w force-pushed the events-table-update branch from aae824c to 09ebdf6 Aug 3, 2017

@erikschlegel

This comment has been minimized.

Copy link
Contributor

commented Aug 6, 2017

Makes sense. LGTM

@erikschlegel erikschlegel merged commit 8582dc4 into master Aug 6, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@c-w c-w deleted the events-table-update branch Oct 31, 2017

rachelnicole pushed a commit that referenced this pull request Jan 24, 2018

rachelnicole pushed a commit that referenced this pull request Jan 24, 2018

Merge pull request #94 from CatalystCode/eventid
Ensure that eventid is unique
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.