It is an important basis to retrieve images in Image Databases (IDBs) by the objects contained in the images and the interrelationships among these objects. Spatial relationship is one of the most perceptive discriminations (or similarities) between images. The 2D string approach provides a compact and efficient method to preserve the spatial knowledge and to perform the matching mechanism. However, the 2D string matching method is only suitable for sub-image queries. A similarity retrieval method based on 2D string longest common subsequence (2D LCS) is proposed by Lee et al., but their algorithm to calculate the length of 2D LCS (or the similarity degree of two images) is transformed to an NP-hard problem. In this paper, we propose a new method of similarity retrieval based on 2D LCS. The efficiency of the proposed algorithm is polynomial. Furthermore, the proposed model can be extended to discriminate images by the multiple attributes of contained objects as well as their spatial constraints. Thus an efficient and effective similarity retrieval model is achieved.