In the context of database management systems, a table scan occurs when a database must examine all the rows in a table to execute a query. This can be a time-consuming process, especially for large tables. Avoiding table scans can significantly improve the performance of database queries.
There are a number of techniques that can be used to avoid table scans. One common technique is to use indexes. An index is a data structure that maps the values of a particular column to the corresponding row in the table. When a query is executed, the database can use the index to quickly locate the rows that match the query criteria, without having to scan the entire table.