log mdp base sql