db: sql debug mode was executing the SQL twice