Skip to content
New issue

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

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

Already on GitHub? # to your account

Potential SQL performance improvement #585

Closed
RamblinWreck77 opened this issue Feb 6, 2023 · 5 comments
Closed

Potential SQL performance improvement #585

RamblinWreck77 opened this issue Feb 6, 2023 · 5 comments

Comments

@RamblinWreck77
Copy link
Contributor

Version: 4.0.4

Seemed different enough from #584 to warrant its own issue, but I also noticed this in the disk report section:

Screenshot 2023-02-06 at 2 00 16 PM

Code:

Screenshot 2023-02-06 at 2 01 18 PM

@weibel
Copy link

weibel commented Apr 26, 2023

On our app the disk write report shows that Mixpanel consumes in total 48% across several traces

@RamblinWreck77
Copy link
Contributor Author

@zihejia This is the majority of our disk usage and we send a relatively small number of events. Could we potentially get this optimized in the next few weeks? Again I'm not an SQL expert but it seems like adding an index is relatively straightforward?

@jaredmixpanel
Copy link
Contributor

jaredmixpanel commented Apr 27, 2023

@RamblinWreck77 @weibel The Apple docs say...

The Disk Writes Report pane suggestions identify queries that may benefit from an index.

The Disk Writes Report pane suggests using write-ahead logging when a stack trace indicates a different journaling mode.

Are either of you seeing those suggestions or any others? I am going to look into this and see what we can do.

EDIT: Ah, I see the screenshot above does suggest an index.

@jaredmixpanel
Copy link
Contributor

jaredmixpanel commented Apr 28, 2023

@RamblinWreck77 @weibel I've released v4.1.1 which adds an index and enables WAL journaling mode. I'm going to close this for now. Feel free to re-open if the issue persists.

@RamblinWreck77
Copy link
Contributor Author

@jaredmixpanel FWIW, this one update (mixpanel update was the only change) has reduced our disk writes MB/day to 1/5th the previous value

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants