5 Replies Latest reply on Nov 21, 2016 9:24 AM by Jeff D

    Views that doesn't exist in Hist_Views?

    Travis Cook

      Hey all -

       

      I'm trying to figure out why I have missing data in the historical_events table.  Well, I don't know specifically if anything is missing in this table, but I have generally found that data in view_stats doesn't totally align with counts of views in historical_events.  One potential source of the issue that I've found is that there are certain views in the "views" table that have no records with that view_id in hist_views.  Obviously, if a view isn't in hist_views, it's impossible that any views for it can show up in historical_events.

       

      Has anyone else tried to diagnose this kind of thing before or experienced a similar issue?

       

      Here's the query I'm running:

       

      SELECT *
      FROM public.views v
      WHERE NOT EXISTS(SELECT 1  
        --SELECT *
        FROM public.hist_views hviews
        WHERE v.id = hviews.view_id)
      

       

      For me - this returns over 9300 rows, which seems like way too many.  i would expect to find 0.