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

Avoid calling current_database in table_comment #25974

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Jul 28, 2016

current_database executes a query and table_comment is called to all
tables even if a table does not have a comment. Using current_database
increases extra queries.

Related #25340.

`current_database` executes a query and `table_comment` is called to all
tables even if a table does not have a comment. Using `current_database`
increases extra queries.
@rails-bot
Copy link

r? @matthewd

(@rails-bot has picked a reviewer for you, use r? to override)

@rafaelfranca rafaelfranca merged commit b334881 into rails:master Jul 28, 2016
rafaelfranca added a commit that referenced this pull request Jul 28, 2016
…in_table_comment

Avoid calling `current_database` in `table_comment`
@rafaelfranca
Copy link
Member

Backported in 2a71374

@kamipo kamipo deleted the avoid_calling_current_database_in_table_comment branch July 28, 2016 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants