Random query errors on materialized view with AutoRefresh On

0

one of our users is getting an error occasionally on a view that has autorefresh on. the name of the table is vwdeviceplatform. Is it because the view is being autofreshed at the time they are running the query? Any way to avoid that? We don't want to schedule manual refreshes.

Invalid operation. Relation "mv_tbl_vwdeviceplatform_0" does not exist.

User is using dbeaver

asked a year ago254 views
1 Answer
0

Hello,

In this context, to check whether the error is indeed due to MV being refreshed at the time of the query, you can co-relate the timings that you are facing this error with the information from the system table SVL_MV_REFRESH_STATUS. The SVL_MV_REFRESH_STATUS view contains a row for the refresh activity of materialized views.

[+] https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_MV_REFRESH_STATUS.html 

Sample query to view the refresh status of materialized views -

select * from svl_mv_refresh_status;

You can compare the starttime, endtime columns with the time of the occurrence of the error.

That being said, if you would like resource based troubleshooting, please raise a support case with AWS for further information. If a support case has already been created please be assured that we will get back to you and assist you in the best way possible.

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions