Databases Reference
In-Depth Information
8.
Execute a
GROUP
BY
query (the same query as in step 4):
SET AUTOT TRACE EXP STAT
SELECT CUST_CITY, COUNT(*)
FROM CUSTOMERS
GROUP BY CUST_CITY;
9.
Drop the index:
SET AUTOT OFF
DROP INDEX IX_CUST_CITY;
How it works...
In this recipe, we use the
CUSTOMERS
table of the
SH
schema to perform our experiments.
We execute three different queries on this table. The first query (in step 2) uses an
ORDER
BY
clause. We can see the execution plan of this query in the following screenshot; it requires a
SORT
ORDER
BY
step to be evaluated: