Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Top 10 Re-fetches in Depot


The MC has a great utility for determine that top 10 tables with the most refetches in a given period:
Top 10 Re-fetches in Depot

How can I get the same list with a query?
Thanks for any pointers!


Best Answer

  • Jim_KnicelyJim_Knicely Administrator
    Answer ✓

    Should be this one:

    SELECT COUNT(*) AS refetches,
           pr.projection_schema AS table_schema,
           pr.anchor_table_name AS table_name
      FROM v_internal.dc_depot_fetches f
      JOIN storage_containers s 
        ON s.sal_storage_id = f.storageid
      JOIN projections pr
        ON pr.projection_id = s.projection_id
     WHERE time > to_timestamp_tz({from_time}) AND time <= to_timestamp_tz({to_time})
     GROUP BY 2,3
    HAVING COUNT(*) > 1
     ORDER BY refetches, pr.projection_schema, pr.anchor_table_name DESC
     LIMIT 10;


Leave a Comment

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

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.