I am tracing some user behavior through database and found something strange.
I was wondering if anyone know, for any ‘idvisitor’ data recorded in table piwik_log_link_visit_action, is there a mapped idvisitor data in table ‘piwik_log_visit’.
I think the answer should be yes? Since every visit should have a record in piwik_log_visit to store the visit_first_action_time and visit_last_action_time with its idvisitor value, and piwik_log_link_visit_action is the detail actions. Please correct me if I am wrong, thank you.
I run it on the demo and got: 3311260 VS 3255891
so there is not that much difference but still some difference
Then I restricted only to the last 1 million visits, and it looks much better
SELECT COUNT( DISTINCT (idvisitor) ) FROM `piwik_log_link_visit_action` where idvisit > 4224089;
598804
SELECT COUNT( DISTINCT (idvisitor) ) FROM `piwik_log_visit` where idvisit > 4224089;
598810
So i would say “works for me”. The small difference can be explained by missing INSERTs… can you try to restrict to recent visits?