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

REPLACE view performance improvement needed and "AS OF SYSTEM TIME" supported #64577

Closed
GlennFawcett-doordash opened this issue May 3, 2021 · 7 comments
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) O-community Originated from the community T-sql-queries SQL Queries Team

Comments

@GlennFawcett-doordash
Copy link

GlennFawcett-doordash commented May 3, 2021

Is your feature request related to a problem? Please describe.
We are using "CREATE or REPLACE VIEW" to workaround lack of TTL functionality. When we create or replace a view, it causes performance to drop for about a minute!!! Need a smooth transition when replacing the view.

interruption_createview sql

Describe the solution you'd like
Would like a smooth transition from previous view to the new view. It doesn't have to be transactional but should have a clean transition without the massive drop in performance for 1 minute. Additionally, Would like like to be able to create a view on tables with as of system time. The multiple tables than make up the view are used for reporting.

Describe alternatives you've considered
TTL or True partitioning are not available so a structure of views per-month were our best last choice.

Epic: CRDB-9838

Jira issue: CRDB-7138

@GlennFawcett-doordash GlennFawcett-doordash added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label May 3, 2021
@blathers-crl
Copy link

blathers-crl bot commented May 3, 2021

Hello, I am Blathers. I am here to help you get the issue triaged.

I was unable to automatically find someone to ping.

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-untriaged blathers was unable to find an owner labels May 3, 2021
@rafiss
Copy link
Collaborator

rafiss commented May 5, 2021

cc @vy-ton

@rafiss rafiss removed the X-blathers-untriaged blathers was unable to find an owner label May 5, 2021
@vy-ton
Copy link
Contributor

vy-ton commented May 5, 2021

Thanks for the ping @rafiss. This came up in a user interview so we should investigate for a future milestone.

@rafiss rafiss added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label May 12, 2021
@rafiss
Copy link
Collaborator

rafiss commented Jun 14, 2021

The feature to create a view based on a follower read seems reasonable. Though the qps dropping down to zero when creating a view normally is definitely not expected. To clarify, is the behavior from the screenshot from a regular VIEW or a MATERIALIZED VIEW?

It seems like something that should be handled as a support item, since zero qps is definitely quite bad.

@vy-ton
Copy link
Contributor

vy-ton commented Jun 28, 2021

Confirmed that screenshot is for a VIEW

@rafiss
Copy link
Collaborator

rafiss commented Jul 22, 2021

Relates to the request in #50753 and the root issue is #35712

@rafiss rafiss removed the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Nov 17, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Nov 17, 2022
@mgartner mgartner moved this to Backlog (DO NOT ADD NEW ISSUES) in SQL Queries Jul 24, 2023
@mgartner
Copy link
Collaborator

It sounds like this is no longer needed now that we support TTL and we have the other two issues tracking the root issue.

@github-project-automation github-project-automation bot moved this from Backlog (DO NOT ADD NEW ISSUES) to Done in SQL Queries Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) O-community Originated from the community T-sql-queries SQL Queries Team
Projects
Archived in project
Development

No branches or pull requests

4 participants