ABSTRACT

It is often necessary to find all structures that contain a given substructure. Consider the substructure search to find all structures that contain the phenol group. Using the matches function described in a previous chapter, the SQL to carry out such a substructure search is:

This cannot make use of the index on the column cansmi. Every row of the table must be examined to see if the matches function succeeds. This is a time-consuming process compared to a direct, indexed lookup.