DEV Community

loading...

Explain DB2 query

adzubla profile image Eduardo Issao Ito ・1 min read

Write your SQL query to a file query.sql using the schema name in all tables.

db2expln -database DATABASE -t -g -terminator ';' -f query.sql

The db2advis can suggest some indices for the query:

db2advis -d DATABASE -i query.sql

Discussion (0)

pic
Editor guide