In essence, using SP effectively reduces the number of paths that need to be searched during the query (but may also return a smaller graph in cases where there are multiple paths of same distance between a given substance and the target molecule). This results in a considerable speed up in the query time.