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

Surface materialized views in view names #1459

Closed
1 task
AetherUnbound opened this issue Aug 18, 2022 · 1 comment
Closed
1 task

Surface materialized views in view names #1459

AetherUnbound opened this issue Aug 18, 2022 · 1 comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: catalog Related to the catalog and Airflow DAGs 💾 tech: postgres Involves PostgreSQL 🐍 tech: python Involves Python
Projects

Comments

@AetherUnbound
Copy link
Contributor

Description

Right now we have we have a mix of views & materialized views in the database. For instance, audio_view and audioset_view - the former is actually a materialized view whereas the latter is a standard view. The syntax for operating with these tables can be different (e.g. DROP MATERIALIZED VIEW vs DROP VIEW).

It might be useful to reflect which views are actually materialized by incorporating it in their name. We could use matview instead of view for the suffix. Here are the current tables:

deploy@localhost:openledger> \d
+--------+----------------------------+-------------------+--------+
| Schema | Name                       | Type              | Owner  |
|--------+----------------------------+-------------------+--------|
| public | audio                      | table             | deploy |
| public | audio_popularity_constants | materialized view | deploy |
| public | audio_popularity_metrics   | table             | deploy |
| public | audio_view                 | materialized view | deploy |
| public | audioset_view              | view              | deploy |
| public | image                      | table             | deploy |
| public | image_popularity_constants | materialized view | deploy |
| public | image_popularity_metrics   | table             | deploy |
| public | image_view                 | materialized view | deploy |
| public | smithsonian_new_unit_codes | table             | deploy |
+--------+----------------------------+-------------------+--------+

This would mean we'd update the following:

  • audio_view -> audio_matview
  • image_view -> image_matview

I'm excluding the popularity constants matviews because they do not have any suffix, but perhaps we should add suffixes there as well.

Note that this will also necessarily require changes in the ingestion server code for which tables to reference.

Implementation

  • 🙋 I would be interested in implementing this feature.
@AetherUnbound AetherUnbound added 🐍 tech: python Involves Python 💾 tech: postgres Involves PostgreSQL 🕹 aspect: interface Concerns end-users' experience with the software 🟩 priority: low Low priority and doesn't need to be rushed 🧰 goal: internal improvement Improvement that benefits maintainers, not users labels Aug 18, 2022
@obulat obulat added the 🧱 stack: catalog Related to the catalog and Airflow DAGs label Feb 24, 2023
@obulat obulat transferred this issue from WordPress/openverse-catalog Apr 17, 2023
@AetherUnbound
Copy link
Contributor Author

Closing this as it's no longer relevant - we don't have these matviews any more!

@AetherUnbound AetherUnbound closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: catalog Related to the catalog and Airflow DAGs 💾 tech: postgres Involves PostgreSQL 🐍 tech: python Involves Python
Projects
Archived in project
Openverse
  
Backlog
Development

No branches or pull requests

2 participants