-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Don't EXPLAIN the unexplainable in postgresql #7544
Conversation
I think is better to add the no supported queries to this: https://github.com/dlee/rails/blob/4ff8fde2f0f7055f3b869593b3ee6f711255a073/activerecord/lib/active_record/explain_subscriber.rb#L20 |
It seems that this is related to #6458 . |
@rafaelfranca Ah, didn't even see that. What do you think about making it a whitelist instead of a blacklist? @kennyj adds a whitelist approach here: kennyj@4a25742 |
@dlee I prefer the whitelist too. Could you guys work on this one and ping me when finished? |
@dlee my approach is similar to your approach. |
@kennyj Yeah, I think your whitelist approach is better. Would it make sense to take out the |
I think we should use both |
👍 Thank you to take care of this one guys. Ping me when done |
@kennyj Should we have a |
@dlee Sorry for keeping you waiting for this reply. IMO, we should use for example, https://github.com/rails/rails/blob/master/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L406 I think too hard to maintain too. |
If you agree with me, I submit PR about 4a25742 . |
Shouldn't that PRAGMA query be marked as SCHEMA? |
@fxn I agree with you. I'll send a PR that against it. BTW, I investigated name's varietions when executing rake. |
@kennyj I think the PR is fine. Please send it |
@rafaelfranca I sent the PR. |
I don't see this in the current 3.2.x code. Any chance this will get pushed out to the active_record gem soon? |
It was released on 3.2.9 |
Only run EXPLAIN for statements that are supported. Really fixes Issue #5430.