Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about performance on bulk updates (ex. UPDATE table SET value = value + 1) #103

Open
cyppe opened this issue Jan 20, 2024 · 2 comments

Comments

@cyppe
Copy link

cyppe commented Jan 20, 2024

Hello!

Maybe it's a general replication "thing", but when I run the benchmark script I get good performance.

18106 event by seconds (1365000 total)
18105 event by seconds (1366000 total)
18105 event by seconds (1367000 total)
18105 event by seconds (1368000 total)
18106 event by seconds (1369000 total)
18106 event by seconds (1370000 total)
18107 event by seconds (1371000 total)
18107 event by seconds (1372000 total)

But if I run a huge bulk update (UPDATE table SET value = value + 1) on say 2 million rows. Then I only seem to handle about 500 events per second.

Is that expected or is there something I could look into?

This is without any processing of the data, just how many events being fired.

@cyppe
Copy link
Author

cyppe commented Jan 20, 2024

Or actually.. I just measured it it in wrong way. In bulk each event contains a lot of rows. So It's actually processing on average 40.000 rows for me. So all good.

@cyppe cyppe closed this as completed Jan 20, 2024
@cyppe
Copy link
Author

cyppe commented Jan 20, 2024

Last addition: For big tables, or rather, wide tables with a lot of columns it's pretty slow anyway. But it's more data so shuffle around so I guess it makes sense.

It's around 3000 rows per second in such cases. Maybe someone has some ideas to improve this. able has around 50 columns, so maybe it's the way it is.

But interesting if anyone has any ideas.

And again - it's not about data processing, the event dispatches a job to process it. I measure just the pure speed the event is called with the updated data object.

@cyppe cyppe reopened this Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant