Retrieval of information from the database and web log files is a very time consuming process. There are many techniques and models to retrieve data from the web. There are two types of data available on the web i.e. structured and unstructured. If data is structured then retrieval of information is an easy task. Otherwise, firstly apply the algorithm to unstructured data and then models will be applied. Vector space and Boolean models are used for IR. In this paper, we compare both Boolean model & Vector Space model techniques to retrieve data from the web (log files) and proposed a new algorithm based on time, frequency, memory consumption, etc.