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

Fixes #10879 - improved reports widget performance #2478

Closed
wants to merge 1 commit into from

Conversation

lzap
Copy link
Member

@lzap lzap commented Jun 22, 2015

and made created_at column non-NULL to prevent from other expensive queries
with "NULLS FIRST" or "NULLS LAST". This is being added by scoped_search.

@lzap
Copy link
Member Author

lzap commented Jun 22, 2015

Our patch for the widget is basically termorary until this is merged: wvanbergen/scoped_search#132

@domcleal domcleal added the Reached an impasse Needs broader discussion label Jun 23, 2015
@domcleal
Copy link
Contributor

FYI, I intend to just close this PR once a new scoped_search is released, we'll simply inherit the bug fix from your work there.

@domcleal
Copy link
Contributor

Thanks @lzap!

@domcleal domcleal closed this Jun 23, 2015
@domcleal
Copy link
Contributor

Belatedly, I notice that you're including a DB migration here to make the column non-null, reopening.

@domcleal domcleal reopened this Jun 23, 2015
@domcleal domcleal removed the Reached an impasse Needs broader discussion label Jun 23, 2015
@@ -59,8 +59,8 @@ def searchable_links(name, search, counter)
end

def latest_events
# 6 reports + header fits the events box nicely...
Report.authorized(:view_reports).my_reports.interesting.search_for('reported > "7 days ago"').limit(6).includes(:host)
# scoped_search generates unoptimized query until this is fixed: https://github.com/wvanbergen/scoped_search/pull/132
Copy link
Contributor

Choose a reason for hiding this comment

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

This file's changes can be reverted now.

@lzap
Copy link
Member Author

lzap commented Jun 24, 2015

Sure, rebased!

@domcleal
Copy link
Contributor

Merged as 3dfaf19, thanks @lzap.

@domcleal domcleal closed this Jun 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants