Difference Between Explain And Explain Analyze
The explain
statement allows you to gain some insight into the performance of a query. You may hear explain
and explain analyze
referred to interchangeably in conversation. Though they can both be used to explore how a query will perform, it's important to know a key difference. explain analyze
executes the query, explain
does not.
For select
queries, the distinction may not feel that important. For insert
s, update
s, and delete
s, you'll want to be clear about which one you are using.
With explain
, you get cost estimates of the insert
statement.
With explain analyze
, you get estimates and actual numbers. You also get a row inserted in the books
table.
Last updated