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

Allow performance checking on SQL queries #56

Open
Manfred opened this issue Oct 31, 2019 · 4 comments
Open

Allow performance checking on SQL queries #56

Manfred opened this issue Oct 31, 2019 · 4 comments

Comments

@Manfred
Copy link
Collaborator

Manfred commented Oct 31, 2019

  • As a developer I want to run a raw SQL query against a production-like database so I can optimize it

Allow a developer to run SQL queries against the PerfCheck database so they can test performance and get EXPLAIN output without having to SSH into a PerfCheck server and get access to the database.

@Manfred
Copy link
Collaborator Author

Manfred commented Oct 31, 2019

Optionally we could make EXPLAIN really nice.

Screenshot 2019-10-31 at 11 32 45

@sudara
Copy link
Member

sudara commented Oct 31, 2019

This is a pretty interesting idea. Currently wondering if it's "enough" to deter console access, as I know that many are often ssh'ing in to:

  1. Open a console to inspect which customer has most X records
  2. Running the queries via the rails console

However, I think some of that could be mitigated with some in-app guidance.

@sudara
Copy link
Member

sudara commented Oct 31, 2019

Also, in the case that triggered this — I followed up with the dev, and the reason a normal perf check job wasn't run is still because

  1. the perception of the db state was in question and
  2. It's currently difficult to run a successful job, so much so that people aren't trying.

So we should probably wait on this to see if this resurfaces as a need once we are more stable and the majority of the jobs people run succeed instead of fail. (We never had people with this need on the old daemon)

Related — we used to provide a link rack mini profiler results which contained more information about each query. Instead of providing granular access to the db, we could surface those results again if rack-mini-profiler is installed.

@Manfred
Copy link
Collaborator Author

Manfred commented Oct 31, 2019

I guess any time someone feels the needs to access the console is an indication of missing performance or debugging tools.

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

2 participants