I have a basic question about crawl / search index. Index scanning is effective for a large number of rows. That is, the cost of scanning the index is inversely proportional to the number of rows returned. This is less than the number of lines that are more expensive than the request, as it must crawl all pages, resulting in more I / O.
I was looking for the reason why searches are becoming more expensive than crawling, but I cannot understand why the search is becoming expensive.
What bothers me is index search. Why index search becomes expensive with lots of rows returned. Index search will always be faster and more efficient than crawling, as it directly relates to pages containing strings. Thus, even with a large number of rows, the returned index search should always be more efficient than the index. But this does not happen. I want to know exactly why at some point the search becomes expensive.
select id,name,col1,col2 from TableA -- Will result in index scan. Table has 10000 rows with clustered index on ID column. Query has covering index. select id,name,col1,col2 where ID between 1 and 10 from TableA -- Optimizer Will use index Seek.
Now, why does the query below get expensive when forcing an index -
select id,name,col1,col2 from TableA with (forceseek)
source share