Skip to content

Use --no-auto-rehash for MySQL commands by default, for performance boost#1664

Closed
mwithheld wants to merge 3 commits intowp-cli:masterfrom
mwithheld:patch-1
Closed

Use --no-auto-rehash for MySQL commands by default, for performance boost#1664
mwithheld wants to merge 3 commits intowp-cli:masterfrom
mwithheld:patch-1

Conversation

@mwithheld
Copy link

Add --no-auto-rehash to mysql CLI options, disabling name completion to speed up non-interactive query processing.

Add --no-auto-rehash to mysql CLI options, disabling name completion to speed up non-interactive query processing.
@scribu
Copy link
Member

scribu commented Feb 17, 2015

Do you have some stats that show the execution time before and after applying the patch?

@mwithheld
Copy link
Author

We've got ~4000 tables on a remote server at the moment. With auto-rehash starting mysql takes ~2-3 minutes to gather the table and column names before it'll actually run a query.

@szepeviktor
Copy link
Contributor

Move  mysql --no-defaults param before --no-auto-rehash b/c mysql cares about param order in this case.
@mwithheld
Copy link
Author

I don't really understand why the build is failing on this now (https://travis-ci.org/wp-cli/wp-cli/jobs/51318140). The output shows a bunch of rows and then says there isn't any rows.

@szepeviktor
Copy link
Contributor

It looks like 4.1.1 has just came out.

@szepeviktor
Copy link
Contributor

@mwithheld
Copy link
Author

Do I need to re-commit now that build 3707 (fixing the version check to allow 4.1.1) has gone through?

@szepeviktor
Copy link
Contributor

#1666

@szepeviktor
Copy link
Contributor

This PR is OK. Only features/core.feature generated a failure.

@danielbachhuber danielbachhuber changed the title Update db.php Use --no-auto-rehash for MySQL commands by default, for performance boost Feb 19, 2015
@danielbachhuber danielbachhuber added this to the next milestone Feb 19, 2015
@danielbachhuber
Copy link
Member

@mwithheld Can you merge master into this PR so we get a successful build?

@mwithheld
Copy link
Author

I don't know how to do that, sorry. I've rebased my clone if that helps.

@danielbachhuber
Copy link
Member

I've created a clean PR in #1668. We'll see if that does the trick.

@szepeviktor
Copy link
Contributor

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.

4 participants