Skip to content

Removed slow subquery from albums view#283

Closed
gs11 wants to merge 1 commit into
Sonerezh:developmentfrom
gs11:development
Closed

Removed slow subquery from albums view#283
gs11 wants to merge 1 commit into
Sonerezh:developmentfrom
gs11:development

Conversation

@gs11

@gs11 gs11 commented Feb 27, 2017

Copy link
Copy Markdown

Fix for issue #279

'conditions' => $subQuery,
'fields' => array('MIN(Song.id)', 'Song.band', 'Song.album', 'Song.cover'),
'order' => 'Song.created DESC',
'group' => 'Song.album',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try grouping also by Song.band to allow showing albums with the same name from different artists ? ( See #236 which was reverted due to poor performances apparently)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I amended the commit to group by both columns. Tested ok in the GUI :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gs11 great ! It should also be the same for the grouping on the "latest" albums (line 251).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If repo owners don't oppose it, I can include that change too in this pull req.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reconsidered and will place that fix in a separate pull request. Not sure how I create a new pull request with just that commit though. Fix here: https://github.com/gs11/sonerezh/commit/af91a03a17c2e6acde383fe756b89af27f1dea26

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a new branch (based on development or your actual branch, depending on the base code you depend on), cherry-pick gs11@af91a03 into this branch. Make a PR from this branch to dev.

In this actual branch, I guess git rebase -i 57d1531 and there you remove commit af91a03. Force push, and that should do it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems I can't split them since the second commit does changes on what was introduced in the first commit? (getting conflicts) I guess the options then are 1) either remove my last commit, get the pull request merged by the owner and then re-commit and create the new pull request for the last commit 2) or let both commits stay in the same pull request.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would advice 1), even if it's the longest path, because with 2) the devs might refused your PR because they don't like the second commit.

It's a bit more painful, but I think it's safer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, last push rolled-back making this pull request only include one commit.

@gs11

gs11 commented May 12, 2017

Copy link
Copy Markdown
Author

Closing PR to use another source branch rather than development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants