I am wondering if there's a method to query some type of a database and just fetch a particular window within the full result set without needing to really undergo all of them.
For instance, basically query my database and that i want only results number 100 to 200, would the database fetch all of the results (say to 1000) that match my query and then on filter these to exclude any factor outdoors my specified window frame ?
Really, I am focusing on a complete text search problem (not necessarily relational db stuff).
So what about Google along with other search engines like google, will they get full result then filter or have they got immediate access to simply the appropriate window frame ?
Thanks all !
Your real question is most likely best clarified in 2 parts.
For any database (traditional, relational), a question that's performed consists of numerous "where" clauses, that will make the database engine to limit the amount of results it returns. If you specify a where clause that essentially limits between 2 values from the primary key,
choose * From table where id>99 and id<201
you will get what you are requesting.
- For any internet search engine, a question you are making to obtain the results will invariably paginate - using various techniques, all of the results is going to be pre-split up into pages along with a couple of is going to be cached. Other pages is going to be produced when needed. If you want pages 100-200 then you definitely only ever fetch individuals that are required.
The choice to filter is not so efficient because large data sources never wish to load almost all their data into memory and slice - you simply want to load certain requirements.