Databases Reference
In-Depth Information
We can see that there are 5068 physical reads to answer the query, because the database
is scanning the entire table—so each database block of the table—to find the data we have
asked for.
If we execute the same query on the MY_SALES_2 table, we obtain the following results:
Comparing the previous two screenshots, we can observe that the number of physical reads
haven't changed between the execution. So, even if the MY_SALES_2 table contains only 10
percent of the rows, the number of database blocks scanned to answer the query will not vary,
because the number of blocks used by the table is the same.
We try to shrink the space used by the table, executing the ALTER TABLE SHRINK SPACE
command. After getting the updated stats, you can see that the number of blocks have changed.
 
Search WWH ::




Custom Search