Chapter 8
SPD Server SQL Query Rewrite
Facility
Overview of the SQL Query Rewrite Facility
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Storage Space for the SQL Query Rewrite Facility
. . . . . . . . . . . . . . .
SQL Query Rewrite Facility Options
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
_QRWENABLE Option: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
_QRW Option: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overview of the SQL Query Rewrite Facility
The SQL Query Rewrite facility in SPD Server examines SQL queries in order to optimize
processing performance. Some SQL queries contain SQL statements and sub-queries that
can be more rapidly evaluated in a separate space, as opposed to sequentially evaluating
large blocks of SQL statements. When SPD Server detects and processes SQL statements
or sub-queries in a separate space, intermediate result tables are produced. The original
SQL query is dynamically rewritten, using intermediate results tables to replace the SQL
code that was separately evaluated. The result is a dynamic process that evaluates and
processes SQL queries more efficiently.
Inserting the derived intermediate data into the original SQL query does not change the
quantitative results; it only expedites the processing that is required to calculate them. The
SQL Query Rewrite Facility does not change the content of the query's answer row set.
However, the order of the rows in the query answer set might vary if you compare the
optimized query answer set with the query answer set SPD Server generates with the SQL
Query Rewrite facility disabled.
Configuring Storage Space for the SQL Query
Rewrite Facility
The SQL Query Rewrite Facility uses intermediate results tables to expedite original SQL
queries. SPD Server administrators must provide adequate space for the generation and
storage of the intermediate results tables. The intermediate results tables are formatted as
SPD Server tables. Optional indexes are permitted.
Intermediate results tables are stored in a common SPD Server LIBNAME domain that the
SPD Server administrator specifies. One dedicated SQL Rewrite Facility LIBNAME
domain is sufficient to provide adequate intermediate results table storage for many
89
Summary of Contents for Scalable Performance Data Server 4.5
Page 1: ...SAS Scalable Performance Data Server 4 5 Administrator s Guide...
Page 7: ...Part 1 Product Notes Chapter 1 SPD Server 4 5 Product Notes 3 1...
Page 8: ...2...
Page 12: ...6...
Page 63: ...Part 3 Migration Chapter 5 SPD Server 3 x to SPD Server 4 5 Conversion Utility 59 57...
Page 64: ...58...
Page 70: ...64 Chapter 5 SPD Server 3 x to SPD Server 4 5 Conversion Utility...
Page 72: ...66...
Page 76: ...70 Chapter 6 Using the SPD Server Name Server to Manage Resources...
Page 94: ...88 Chapter 7 Administering and Configuring SPD Server Using the SAS Management Console...
Page 98: ...92 Chapter 8 SPD Server SQL Query Rewrite Facility...
Page 116: ...110 Chapter 10 Configuring Disk Storage for SPD Server...
Page 128: ...122 Chapter 11 Setting Up SPD Server Parameter Files...
Page 154: ...148...
Page 198: ...192 Chapter 14 ACL Security Overview...
Page 212: ...206 Chapter 15 Managing SPD Server Passwords Users and Table ACLs...
Page 214: ...208...
Page 224: ...218 Chapter 16 SPD Server Operator Interface Procedure PROC SPDO...
Page 236: ...230 Chapter 18 SPD Server Table List Utility Spdsls...
Page 256: ...250 Chapter 19 SPD Server Backup and Restore Utilities...
Page 264: ...258 Chapter 20 SPD Server Directory Cleanup Utility...
Page 270: ......