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

default inline_sql_views (aka turbo button) off #18936

Merged
merged 1 commit into from
Jul 3, 2019

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Jul 2, 2019

Overview

Using an inline view (SELECT statement in the FROM clause) allows the database to do much less work. This resulted in some pages going from a few minutes to a few seconds:

Problem (before)

Turbo Button is not mature and has bugs:

  • Some queries are missing a DISTINCT.
  • total record count is wrong and therefore page count
  • not all pages contain 20 records
  • the sorting (ORDER) is ignored

After

We are temporarily turning it off :inline_sql_views.
This will slow down most pages, especially the Hosts, Vms and Services pages.

We will introduce these changes to fix bugs in Hammer and Ivanchuck.
We will possibly turn back on :inline_sql_views once these are fixed

See also:

Copy link
Member

@NickLaMuro NickLaMuro left a comment

Choose a reason for hiding this comment

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

I like the idea of moving this to a class method so we can easily re-enable this in the future.

Sorry this didn't work out, but I kinda expected this wouldn't be that easy to implement and there would be a lot of edge cases surrounding it.

currently this options breaks pagination and sorting
@miq-bot
Copy link
Member

miq-bot commented Jul 2, 2019

Checked commit kbrock@39e25c4 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 0 offenses detected
Everything looks fine. 🏆

@bdunne bdunne merged commit ff9564a into ManageIQ:master Jul 3, 2019
@bdunne bdunne added this to the Sprint 115 Ending Jul 8, 2019 milestone Jul 3, 2019
@bdunne bdunne self-assigned this Jul 3, 2019
@kbrock kbrock deleted the no_mo_turbo branch July 3, 2019 20:49
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