3 Replies Latest reply on May 29, 2013 3:36 PM by Steven Hawkins

    Materialized view scope

    Matej Plch Newbie

      Is there any scope for materialized views similar to scope in caching API? Is there any possibility to have materialized views with user scope for example? Or in this use-case you would advice to use caching API?

        • 1. Re: Materialized view scope
          Steven Hawkins Master

          Currently mat views are scoped to the vdb without an option change the scoping.  The general strategy is to materialize a superset of the data that is needed and then have a view or other logic that will apply the per-user effect.  The caching API unfortunately does not have perfect substitutes for mat views (caching at the user/query level).  What is your scenario like?

           

          Steve

          • 2. Re: Materialized view scope
            Matej Plch Newbie

            We would like to improve performance through some kind of caching. We have our custom translator for our REST-API. Our API doesn't have database background and some operations are quiete resource consuming. All data which are needed for the application which is build over the Teiid platform are accessible after one single initial call (ex. /items). But now there is separate REST call for all items, for item detail, for count etc. Because of overlaying application logic my idea was to "persist" first call into REST API in the materialized view, fill in data into it and all other call would be done against this materialized view until other request for all data would be done. But data are user specific... I think if Teiid caching is suitable for this or we should use our own caching in out Traslator.

            • 3. Re: Materialized view scope
              Steven Hawkins Master

              If it's of interest https://issues.jboss.org/browse/TEIID-2507 has added session scoped materialized views.