To detect a stealth target, one may directly probe it with a single photon and analyze the reflected signals. The efficiency of such conventional detection scheme can potentially be enhanced by quantum illumination, where entanglement is exploited to break the classical limits. The question is what is the optimal signal state for achieving the detection limit? Here, we address this question in a general discrete model, and derive a complete set of analytic solutions. For one-shot detection, the parameter space can be classified into three distinct regions, in the form of a “phase diagram” for both conventional and quantum illumination. Interestingly, whenever the reflectivity of the target is less than some critical value, all received signals become useless, which is true even if entangled resources are employed. However, there does exist a region where quantum illumination can provide advantages over conventional illumination; there, the optimal signal state is an entangled state with an entanglement spectrum inversely proportional to the spectrum of the environmental noise state and is, surprisingly, independent of the occurrence probability and the reflectivity of the object. The entanglement of the ideal probe state increases with the entropy of the environment; it becomes more entangled as the temperature of the environment increases. Finally, we show that the performance advantage cannot be fully characterized by any measure of quantum correlation, unless the environment is a complete mixed state.