{
  "id": "enwiki-001310728147",
  "slug": "full-table-scan",
  "title": "Full table scan",
  "qid": "",
  "lead": "A full table scan (also known as a sequential scan) is a scan made on a database where each row of the table is read in a sequential (serial) order and the columns encountered are checked for the validity of a condition. Full table scans are usually the slowest method of scanning a table due to the heavy amount of I/O reads required from the disk which consists of multiple seeks as well as costly disk to memory transfers.",
  "body": "A full table scan (also known as a sequential scan) is a scan made on a database where each row of the table is read in a sequential (serial) order and the columns encountered are checked for the validity of a condition. Full table scans are usually the slowest method of scanning a table due to the heavy amount of I/O reads required from the disk which consists of multiple seeks as well as costly disk to memory transfers. SELECT name FROM fruits WHERE color = 'red'; The second example shows a SQL statement which returns the name of all fruits in the fruits table. Because this statement has no condition - no WHERE clause - the database engine will use a table scan to load and return the data for this query even if the fruits table has an index on the name column because accessing - i.e. scanning - the table directly is faster than accessing the table through the extra abstraction layer of an index: SELECT name FROM fruits The third example is a counter-example that will almost certainly cause the SQL engine to use an index instead of a table scan. This example uses almost the same query as the previous one, but adds an ORDER BY clause so that the returned names will be in alphabetical order. Assuming that the fruits table has an index on the name column, the database engine will now use that index to return the names in order because accessing the table through the extra abstraction layer of the index provides the benefit of returning the rows in the requested order. Had the engine loaded the rows using a table scan, it would then have to perform the additional work of sorting the returned rows. In some extreme cases - e.g. the statistics maintained by the database engine indicate that the table contains a very small number of rows - the optimizer may still decide to use a table scan for this type of query: SELECT name FROM fruits ORDER BY name",
  "categories": [
    "23603337",
    "24745119",
    "26220375",
    "26294886",
    "27936501"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1310728147",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1757569297.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001310728147",
    "type": "webpage",
    "title": "Full table scan",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/full-table-scan",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          18
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          18
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001310728147",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1310728147",
    "note": "Immutable snapshot enwiki-001310728147"
  }
}