  The LHCb detector is a forward spectrometer at the Large Hadron Collider
(LHC) at CERN. The experiment is designed for precision measurements of CP
violation and rare decays of beauty and charm hadrons. In this paper the
performance of the various LHCb sub-detectors and the trigger system are
described, using data taken from 2010 to 2012. It is shown that the design
criteria of the experiment have been met. The excellent performance of the
detector has allowed the LHCb collaboration to publish a wide range of physics
results, demonstrating LHCb's unique role, both as a heavy flavour experiment
and as a general purpose detector in the forward region.
