  Small- and intermediate-scale galaxy clustering can be used to establish the
galaxy-halo connection to study galaxy formation and evolution and to tighten
constraints on cosmological parameters. With the increasing precision of galaxy
clustering measurements from ongoing and forthcoming large galaxy surveys,
accurate models are required to interpret the data and extract relevant
information. We introduce a method based on high-resolution N-body simulations
to accurately and efficiently model the galaxy two-point correlation functions
(2PCFs) in projected and redshift spaces. The basic idea is to tabulate all
information of haloes in the simulations necessary for computing the galaxy
2PCFs within the framework of halo occupation distribution or conditional
luminosity function. It is equivalent to populating galaxies to dark matter
haloes and using the mock 2PCF measurements as the model predictions. Besides
the accurate 2PCF calculations, the method is also fast and therefore enables
an efficient exploration of the parameter space. As an example of the method,
we decompose the redshift-space galaxy 2PCF into different components based on
the type of galaxy pairs and show the redshift-space distortion effect in each
component. The generalizations and limitations of the method are discussed.
