Prepare a Sample Query Script
Prepare an SQL script file containing a series of queries (SELECT statements) that represent, as accurately as possible, your actual database workload. These queries are used by the
Database Designer to create projections.
The Database Designer is a tool that analyzes a logical schema definition, sample queries, and sample data and generates a set of projections in the form of an SQL script to be executed after you create the tables but before you load any data. The script creates a minimal set of
superprojections to ensure K-Safety, and optionally pre-join projections. In most cases, the projections created by the Database Designer provide excellent query performance within physical constraints. You can, however, write a custom projection script should the Database Designer not meet your needs.
A superprojection is a projection that contains every column of a table in the Logical Schema. A table can have multiple superprojections with different sort orders.
Make sure that each query ends with a semicolon.
How Many Queries
Provide as many sample queries as possible (up to 30,000). The Database Designer requires a reasonably accurate representation of your query workload in to produce an optimal physical schema design.
Types of Queries
Make sure to include your most frequently executed, resource-intensive, and time-critical queries.
Where to Get Queries
As source material, you can use:
- a log of the queries running on an existing database
- queries generated by a business analytics tool such as a report generator