# FT.EXPLAIN
Return the execution plan for a complex query
[Examples](#examples)
## Required arguments
index
is index name. You must first create the index using [`FT.CREATE`](https://redis.io/docs/latestcommands/ft.create/).
query
is query string, as if sent to FT.SEARCH`.
## Optional arguments
DIALECT {dialect_version}
is dialect version under which to execute the query. If not specified, the query executes under the default dialect version set during module initial loading or via [`FT.CONFIG SET`](https://redis.io/docs/latestcommands/ft.config-set/) command.
- In the returned response, a `+` on a term is an indication of stemming.
- Use `redis-cli --raw` to properly read line-breaks in the returned response.
## Return
FT.EXPLAIN returns a string representing the execution plan.
## Examples
Return the execution plan for a complex query
$ redis-cli --raw
127.0.0.1:6379> FT.EXPLAIN rd "(foo bar)|(hello world) @date:[100 200]|@date:[500 +inf]"
INTERSECT {
UNION {
INTERSECT {
foo
bar
}
INTERSECT {
hello
world
}
}
UNION {
NUMERIC {100.000000 <= x <= 200.000000}
NUMERIC {500.000000 <= x <= inf}
}
}
## See also
[`FT.CREATE`](https://redis.io/docs/latestcommands/ft.create/) | [`FT.SEARCH`](https://redis.io/docs/latestcommands/ft.search/) | [`FT.CONFIG SET`](https://redis.io/docs/latestcommands/ft.config-set/)
## Related topics
[RediSearch](https://redis.io/docs/latest/develop/ai/search-and-query/)