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
Remove one index from log_visit that is actually not needed. #7271
Conversation
When moving config_id to the end of the existing other index
Before we merge this PR we must decide if #6953 is still valid or not. Maybe we need to wait for 2.13.0 (edit March 11th - correct issue number) |
This could otherwise lead to confusion and problems IE if the update runs again etc.
This could otherwise lead to confusion and problems IE if the update runs again etc.
FYI #6953 is also about |
It was changed a few days ago ;) The milestone is already set to 2.13 |
refs #6759 |
Moving to 3.0.0 |
Can we merge this one in Piwik 3.0 branch already? If so, I'd create a new PR. |
@@ -153,8 +153,7 @@ public function getTablesCreateSql() | |||
config_id BINARY(8) NOT NULL, | |||
location_ip VARBINARY(16) NOT NULL, | |||
PRIMARY KEY(idvisit), | |||
INDEX index_idsite_config_datetime (idsite, config_id, visit_last_action_time), | |||
INDEX index_idsite_datetime (idsite, visit_last_action_time), | |||
INDEX index_idsite_configid_datetime (idsite, visit_last_action_time, config_id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's rename the INDEX index_idsite_datetime_configid
to follow index field order
Yes we can issue DB schema change again on Piwik 3.0.0 branch. #6953 was closed |
Will issue a new PR |
Noticed the index is quite big for
log_visit
table so had a look and noticed there is one index not needed when we moveconfig_id
to the end of the existingindex_idsite_datetime
index.We had a quick look and it seems that we query
config_id
always in combination withvisit_last_action_time
so should be all good. Probably in the past this was not the case and therefore this index was needed.refs #6953 this does not affect
log_link_visit_action
so should be ok?