Skip to content

Conversation

@mattrobenolt
Copy link
Contributor

It's easily possible that this is 10+ at bare minimum, sometimes into
hundreds of tags per Event.

So changing this to a bulk write means we have 1 transaction and one big
INSERT query which should be considerable speed improvement.

We can get away with this since we currently have a UNIQUE on (event_id,
key_id, value_id), which means this is an all-or-nothing. Since each
call is bound to a single event, this single task never is called more
than once for the same event_id and expect a sum of tags. This means we
can simplify this by choosing not to handle that case at all and should
get a, theoretically, substantial boost in performance.

@ghost
Copy link

ghost commented Nov 14, 2017

1 Warning
⚠️ You should update CHANGES due to the size of this PR

Generated by 🚫 danger

Copy link
Contributor

@bretthoerner bretthoerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏛 so good

@tkaemming
Copy link
Contributor

Nice

It's easily possible that this is 10+ at bare minimum, sometimes into
hundreds of tags per Event.

So changing this to a bulk write means we have 1 transaction and one big
INSERT query which should be considerable speed improvement.

We can get away with this since we currently have a UNIQUE on (event_id,
key_id, value_id), which means this is an all-or-nothing. Since each
call is bound to a single event, this single task never is called more
than once for the same event_id and expect a sum of tags. This means we
can simplify this by choosing not to handle that case at all and should
get a, theoretically, substantial boost in performance.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants