Queries, in the form of
statements, perform all the lookup operations in the database.
Tuning these statements is a top priority, whether to achieve
sub-second response times for dynamic web pages, or to chop
hours off the time to generate huge overnight reports.
SELECT statements, the tuning
techniques for queries also apply to constructs such as
CREATE TABLE...AS SELECT,
WHERE clauses in
DELETE statements. Those
statements have additional performance considerations because
they combine write operations with the read-oriented query