Projections and refresh()

If projections are updated(or refreshed) automatically during the load then why would I need to use refresh() function? Can somebody explain me exact scenario where I do need to call refresh() or start_refresh() and where I don't need to call refresh()?

Comments

  • When you create a new projection, it is not automatically popualated with data. So in order to pouplate it with data
    we use REFRESH() & START_REFRESH() manualy. If you use DBD for projection design, refreshing of projections is done automatically.
     
    REFRESH - Performs a synchronous, optionally-targeted refresh of a specified table's projections.
    Unlike START_REFRESH(), which runs in the background, REFRESH() runs in the foreground of the caller's session.
  • Pravesh, when super projection is created, I don't refresh it. I do believe super projection is an exception. right?
  • Navin_CNavin_C Vertica Customer
    Hello Vijay, The scenario where we need to refresh Projections manually sometimes is when we create manual projections for any query and you want the query to use the same projections meant for it ( .i.e. newly created projection) .
  • I noticed one thing. If a table is loaded when I create a projection manually, it requires refresh(). If the table is empty when I create a projection manually, it does not require refresh()
  • Navin_CNavin_C Vertica Customer
    Hello njvijay, You can understanding this behavior of Vertica with above reply form Pravesh, If a table is loaded when you create projection manually The data is already present in your super projection and you are creating a new projection manually and deploying it, so you need to manually refresh projections so that the new projections can load all the data into them as required. If table is empty when you create projection manually The data is not loaded yet into the table that means there are no super projections, so when you load data or your firs row into the table the row gets loaded into both the super projection as well the manual projection created by you, so you don't need a refresh() Hope this helps

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file