Log transaction that spend too much time in write queries