github / gh-ost

GitHub's Online Schema-migration Tool for MySQL
MIT License
12.42k stars 1.26k forks source link

Handling Slow Queries Without Indexes in gh-ost #1439

Open xf97 opened 3 months ago

xf97 commented 3 months ago

Hello, I'm developing a similar tool. Currently, we've encountered an issue where when we use SELECT xxx FROM xxx WHERE xxx to obtain a result set, if there's no index created on the column processed by the WHERE clause, the entire query will become a slow query. I'd like to ask how gh-ost handles this situation. I'm looking forward to your answer.

meiji163 commented 1 week ago

The row copy ranges over the unique index that gh-ost chooses. See https://github.com/github/gh-ost/blob/master/doc/shared-key.md for more info