  An identifying code of a graph is a dominating set which uniquely determines
all the vertices by their neighborhood within the code. Whereas graphs with
large minimum degree have small domination number, this is not the case for the
identifying code number (the size of a smallest identifying code), which indeed
is not even a monotone parameter with respect to graph inclusion.
  We show that every graph $G$ with $n$ vertices, maximum degree
$\Delta=\omega(1)$ and minimum degree $\delta\geq c\log{\Delta}$, for some
constant $c>0$, contains a large spanning subgraph which admits an identifying
code with size $O\left(\frac{n\log{\Delta}}{\delta}\right)$. In particular, if
$\delta=\Theta(n)$, then $G$ has a dense spanning subgraph with identifying
code $O\left(\log n\right)$, namely, of asymptotically optimal size. The
subgraph we build is created using a probabilistic approach, and we use an
interplay of various random methods to analyze it. Moreover we show that the
result is essentially best possible, both in terms of the number of deleted
edges and the size of the identifying code.
