|
1 |
| -# Automatic In-Memory High |
| 1 | +# Automatic In-Memory Level High |
2 | 2 |
|
3 | 3 | ## Introduction
|
4 | 4 | Watch the video below to get an overview of Automatic In-Memory:
|
@@ -31,9 +31,7 @@ In Oracle Database 18c a feature called Automatic In-Memory (AIM) was added. The
|
31 | 31 | This Lab will explore the new AIM level HIGH and how it works. A new schema will be used, the AIM schema with small, medium and large tables. This will make it easier to show how AIM works as the column store experiences "memory pressure" (i.e. gets full). The LINEORDER table in the SSB schema will be used to help "fill up" the IM column store and then the AIM tables will be used to show how AIM can manage the total number of objects for maximum benefit.
|
32 | 32 |
|
33 | 33 |
|
34 |
| -## Task 1: Verify Directory Definitions |
35 |
| - |
36 |
| -In this Lab we will be populating external data from a local directory and we will need to define a database directory to use in our external table definitions to point the database to our external data. |
| 34 | +## Task 1: AIM Level High |
37 | 35 |
|
38 | 36 | Let's switch to the aim-high folder and log back in to the PDB:
|
39 | 37 |
|
|
320 | 318 | SQL>
|
321 | 319 | ```
|
322 | 320 |
|
323 |
| - Verify that all of the LINEORDER partitions are populated before continuing on with the lab. |
| 321 | + Verify that all of the LINEORDER partitions are populated before continuing on with the lab. You may have to re-run this script to verify that the partitions are populated since it does take a little bit of time to fully populate the partitions. |
324 | 322 |
|
325 | 323 | 5. Let's re-check the inmemory status of the objects in the SSB and AIM schemas:
|
326 | 324 |
|
|
807 | 805 | SQL>
|
808 | 806 | ```
|
809 | 807 |
|
810 |
| -11. Let's take a look at the Heat Map statistics for the segments. |
| 808 | +11. Let's take a look at the Heat Map statistics for the segments. Although Heat Map is not used directly by AIM, and does not have to be enabled for AIM to work, it does give us an easy way to look at the usage statistics that AIM does base its decisions on. |
811 | 809 |
|
812 | 810 | Run the script *11\_hm\_stats.sql*
|
813 | 811 |
|
|
889 | 887 | SQL>
|
890 | 888 | ```
|
891 | 889 |
|
| 890 | + Note that your values may be different than what is shown above. The values shown will be based on the usage that has occurred in your database. |
| 891 | +
|
892 | 892 | 12. Now let's see if we can figure out what has happened with the AIM processing. First we will look at the tasks that are running as part of AIM.
|
893 | 893 |
|
894 | 894 | Run the script *12\_aim\_tasks.sql*
|
|
932 | 932 | SQL>
|
933 | 933 | ```
|
934 | 934 |
|
935 |
| - Make note of the last task_id. We will use this as input in the next step. Also note that the tasks are being run approximately every 2 minutes. As was described in Lab13 on AIM level LOW and MEDIUM, AIM tasks will continue to be scheduled during each IMCO cycle when under memory pressure. Again, this means that it may take a couple of cycles before an object is populated by AIM in the IM column store. |
| 935 | + Make note of the last task_id. We will use this as input in the next step. Also note that the tasks are being run approximately every 2 minutes. AIM tasks will be scheduled during each IMCO cycle, which is approximately every 2 minutes, when the IM column store is under memory pressure. This means that it may take a couple of cycles before an object is populated by AIM in the IM column store. |
936 | 936 |
|
937 | 937 | 13. Now let's look at the AIM task details, or what actually happened.
|
938 | 938 |
|
|
998 | 998 | SQL>
|
999 | 999 | ```
|
1000 | 1000 |
|
1001 |
| - As a reminder, take a look at the OBJECT_NAME and the ACTION. Now that the IM column store is under memory pressure AIM has taken over control of population and there is a lot going on. Based on usage statistics AIM will populate the objects that will result in the most benefit to queries being run. You may want to take a look at some of the other task details to get a better picture of what has happened. Also note that now that AIM is controlling population the PRIORITY level will be ignored and AIM will decide which objects to populate and which to evict. |
| 1001 | + Take a look at the OBJECT_NAME and the ACTION. Now that the IM column store is under memory pressure AIM has taken over control of population and there is a lot going on. Based on usage statistics AIM will populate the objects that will result in the most benefit to queries being run. You may want to take a look at some of the other task details to get a better picture of what has happened. Also note that now that AIM is controlling population the PRIORITY level will be ignored and AIM will decide which objects to populate and which to evict. |
1002 | 1002 |
|
1003 | 1003 | 14. Now let's turn AIM off and see what happens.
|
1004 | 1004 |
|
@@ -1141,7 +1141,7 @@ SQL>
|
1141 | 1141 | SQL>
|
1142 | 1142 | ```
|
1143 | 1143 |
|
1144 |
| - Notice that all of the objects that were enabled for inmemory when the AIM level was set to high have now been disabled. However, the LINEORDER partitions that we manually enabled are still enabled. |
| 1144 | + Notice that all of the objects that were enabled for inmemory when the AIM level was set to HIGH have now been disabled. However, the LINEORDER partitions that we manually enabled are still enabled. |
1145 | 1145 |
|
1146 | 1146 | 16. What has happened to the populated segments in the IM column store?
|
1147 | 1147 |
|
@@ -1284,7 +1284,7 @@ SQL>
|
1284 | 1284 |
|
1285 | 1285 | ## Conclusion
|
1286 | 1286 |
|
1287 |
| -This lab demonstrated how then new INMEMORY\_AUTOMATIC\_LEVEL = HIGH feature works and how AIM level high can enable the automatic management of the contents of IM column store. This means no more having to try and figure out which objects would get the most benefit from being populated. Now the database will do it for you. |
| 1287 | +This lab demonstrated how the new INMEMORY\_AUTOMATIC\_LEVEL = HIGH feature works and how AIM level high can enable the automatic management of the contents of IM column store. This means no more having to try and figure out which objects would get the most benefit from being populated. Now the database will do it for you. |
1288 | 1288 |
|
1289 | 1289 | You may now **proceed to the next lab**.
|
1290 | 1290 |
|
|
0 commit comments