Using sample snapshots to learn how to use Visual Explain

There are four sample snapshots that you can use to learn about Visual Explain. To load them, follow these steps:

  1. If DB2 has not already been started, issue the db2start command.
  2. Ensure that explain tables exist in your database. To do this, follow the instructions in Creating explain tables.
  3. From the DB2 CLP prompt, connect to the database that you want to use. We suggest that you use the SAMPLE database. If it is not already created, see the section on installing the SAMPLE database in the Administration Guide.

    To connect to the SAMPLE database, issue the connect to sample command.

  4. To import the predefined snapshots, which are based on a sample query and are used for the examples that follow, run the DB2 command file VESAMPL.DDL.

    To run the command file, go to this directory and issue the db2 -tf VESAMPL.DDL command.

You are now ready to display and use the access plan graphs.