Database Troubles
This morning we had some database problems. With help from Engine Yard we were able to identify the slower queries and eliminate them. Here you can see our database exploding:…
This morning we had some database problems. With help from Engine Yard we were able to identify the slower queries and eliminate them.
Here you can see our database exploding:
img http://img.skitch.com/20090130-x5dfywbure73aqfjt3bqspckf3.png
And the sweet release when we deployed the fix:
img http://img.skitch.com/20090130-rkcn1b4d566f2x226f46deuq3.png
Basically, our events
table has swelled to over 30m rows taking up 18gb of disk space. We have some solid indexes in place, but saving new events and querying are both becoming problems. As we plan to do more fancy things with the dashboard in the future this needs to be addressed.
Currently the plan is twofold:
-
Split
events
table intoevents
andevents_archive
. Older events will go intoevents_archive
, archiving will happen nightly on a cron. This will dramatically reduce the size of theevents
table. -
Re-evaluate every query that touches
events
, make sure it’s using the best possible index.
We’ll update you as we make progress. Thanks!
Written by
Related posts
Celebrating the GitHub Awards 2024 recipients 🎉
The GitHub Awards celebrates the outstanding contributions and achievements in the developer community by honoring individuals, projects, and organizations for creating an outsized positive impact on the community.
New from Universe 2024: Get the latest previews and releases
Find out how we’re evolving GitHub and GitHub Copilot—and get access to the latest previews and GA releases.
Bringing developer choice to Copilot with Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview
At GitHub Universe, we announced Anthropic’s Claude 3.5 Sonnet, Google’s Gemini 1.5 Pro, and OpenAI’s o1-preview and o1-mini are coming to GitHub Copilot—bringing a new level of choice to every developer.