1. A method for sequence analysis comprising: storing at least one subject sequence as a relation in a relational database; determining an instruction plan for performing a comparison of at least one relational query sequence against the at least one relational subject sequence, the instruction plan having a first part that comprises at least one relational database operation that uses the at least one relational query sequence and the at least one relational subject sequence as data inputs, and the instruction plan also having a subsequent part that comprises at least one relational database operation, such that the instruction plan has multiple parts; executing the at least one relational database operation in the first part of the instruction plan in a data processing unit; storing a data output result relation of execution of the first part of the instruction plan as a database relation in the relational database, such that the data output result relation of execution of the first part of the plan is not materialized until a subsequent part of the plan specifies that materialization is to take place; using the data output result relation of execution of the first part of the instruction plan as at least one data input to the at least one relational database operation in the subsequent part of the plan; and executing the at least one relational database operation in the subsequent part of the plan in a data processing unit to complete the comparison.