Cognitive radio can make full use of idle spectrum for data transfer, and therefore improve the spectrum utilization. Sparse channel estimation explores the sparse property of wireless channels, which reduces the pilot overhead and further improves the spectrum efficiency. This paper investigates the sparse channel estimation in cognitive radio systems as well as the pilot optimization therein, and the channel estimation is formulated as a sparse recovery issue. With the objective to minimize the cross correlation of the measurement matrix, a fast pilot optimization algorithm is then proposed. By flexibly setting the number of outer loop and inner loop, each entry of pilot pattern can be sequentially updated and optimized. Simulation results show that compared to the Least Squares (LS) channel estimation, sparse channel estimation can reduce 72.4% of the pilot overhead and improve the spectrum efficiency by 8.2%. Moreover, the proposed pilot optimization algorithm outperforms the current random search algorithm by saving 5 dB of Signal to Noise Ratio (SNR) at the same 0.012 of Bit Error Rate (BER).