I wasn’t expecting it neither. Maybe it’s slower because raw query is made through ActiveRecord::Base.connection. Perhaps raw sql queries in sequel and AR perform differently. I’ll write bench for raw sql through sequel to compare.
Also I think we should probably maybe do something with the results
Right know we convert to array after fetching. But doing something more specific is better idea, will fix it
I added one more test to measure raw sql through sequel. Note that I added some operations on fetched records in scope_all benches, which caused baseline to go little lower, but differences remained the same.
@sam now I figured out that you weren’t probably thinking of executing raw sql commands through orm’s like AR and sequal, but directly via pg and mysql gems.
Awesome, now that you have this data. I want the graph amended so it can display a comparison of all these 5 results! Start hacking away at the web UI and the backfill.
Only focus on this single test, this is the only test you care about till we can render the 5 lines here and get it backfilled
@sem Just to make myself sure. Since this is graph with commit data, you want me to include here commits for sequel and pg. Therefore it would have 3 lines (AR, sequel, pg) and graph would look something like this:
Yes, absolutely, this is what I want you to work towards!
Possibly, let’s not worry about that for now, just for now worry about getting the graph with the 3 lines going and backfilling all the info. Work with @system on gaining access to prd.
@sam, I am not blocked on anything. Right now I am working on web to display graphs to compare. My first goal is to display sequel along with AR because sequel has been already added. Here’s wip PR on web.
Fantastic, focus on getting stuff merged and on the site as soon as you can. I prefer to have a slightly janky UI than wait weeks till we have the UI in perfect state.
@sam
Little peek. This is with data from production imported in local. UI is not perfect and has some issues but before I get into fixing it I’ll make sure sequel benchmark graphs are being displayed.
PR is some time in reviewing process. According to me it’s ready to be merged. When it’s merged we could compare benchmarks on rubybench.
Jeremy configured sequel repo with webhook to send push events on rubybench, so next time when he pushes something we should have sequel repo with it’s benchmarks on rubybench