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

Create a refresh_schedule Option For Materialized Views #20

Open
RaymondFallon opened this issue Nov 4, 2020 · 2 comments
Open

Create a refresh_schedule Option For Materialized Views #20

RaymondFallon opened this issue Nov 4, 2020 · 2 comments

Comments

@RaymondFallon
Copy link
Member

When using pmacs-rails_sql_views, we were able to pass a refresh_schedule option to the create_materialized_view method. This was a convenient way to tell your MVs, at creation time, when to refresh themselves. This is no long available with scenic, but it would be a nice option to build in.

Considerations

  • Perhaps this is too specific and we should instead add a general options parameter that we pass raw SQL into.
  • It could be a bad idea to add a MV-only option like refresh_schedule to a general view method like create_view.
@RaymondFallon RaymondFallon changed the title Create a refresh_schedule Option For Materializedd Views Create a refresh_schedule Option For Materialized Views May 25, 2023
@riyengar8
Copy link

To add to this issue, I think the refresh_materialized_view method in this adapter is wrong.

UserCourse.refresh

I think the correct way to refresh a MV in Oracle is something like so:

BEGIN
  DBMS_SNAPSHOT.REFRESH('MVIEW_NAME');
END;

Maybe this should be a separate issue as it is not directly related to the fact that there's no ability to create a refresh schedule on create.

@riyengar8
Copy link

I made a new issue for my comment above:

#22

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

No branches or pull requests

2 participants