The speed at which a database returns a query result can be influenced by various factors, including the design of the database and the indexing strategy used. In this case, the fact that the database contains a single column with words and returns faster results for queries that match the column's contents suggests that the database is using an indexing strategy that is optimized for text search.
One common indexing strategy used for text search is a full-text index. A full-text index is a special type of index that is designed to enable fast text search by creating a searchable structure that is optimized for character-by-character comparisons. Full-text indexes are typically created on columns that contain large amounts of text, such as a column with a single-word column.
When a query is run against a table with a full-text index, the database can use the index to quickly locate the rows that match the query criteria. The index is optimized for character-by-character comparisons, so it can quickly scan the index and locate the rows that match the query string. This can result in faster query execution times compared to a non-indexed table, where the database must scan the entire table to find matching rows.
In this case, since the database contains a single column with words and returns faster results for queries that match the column's contents, it is likely that the database is using a full-text index to optimize text search. The full-text index allows the database to quickly scan the index and locate the rows that match the query string, resulting in faster query execution times compared to a non-indexed table.