In this paper, we present an efficient requestbased comparable encryption, which is based on sliding window techniques. Recently, Furukawa (Computer security-ESORICS 2013, Springer, 129-146, 2013) introduced a new primitive called request-based comparable encryption (comparable encryption for short) which overcomes the problem that OPEs cannot solve. OPEs have the problem that when all the numbers in a certain domain are encrypted by an OPE, an attacker can easily obtain all the orders of the encrypted numbers and hence retrieve the original numbers. However, comparable encryption is not efficient enough both in storage and in computation workload. Comparable encryption based on sliding window method Koç in Comput Math Appl 30:17-24, 1995 can adaptively adjust the window size to achieve a high performance. We set the window size as a constant number to conveniently generate ciphertexts and compare with others. Besides, the proposed scheme allows the users to obtain a variable trade-off between security and efficiency through adaptively setting the window size.