Why Are Table Scans Bad? At my work, I am often told that I shouldn't do a table scan because it could negatively impact the database and the app using the database. What exactly do they mean by &quot;negatively impact&quot;? One negative impact I can think of is that a table scan would use up a lot of the disk's time, blocking other requests from using the disk.
Is there a way to do a table scan without any negative impacts? Sometimes I need to do a table scan for one off checks (for routine things, I would of course make an index).
Table scans are not evil per se, it depends on what the query is supposed to do. If a large portion of the table is either returned to the application or used in some aggregate (like sum), it is probably most efficient to do a table scan.
If on the other hand, a small percentage of the table is to be used, looking up the rows via an index is much more efficient.
A scan uses disk resources as you mention. Another effect is that cached data in memory might have to be flushed to make room for the scan. I.e. applications may have to read data from disk instead of memory due to unnecessary scans.